e2fsprogs fixes:
[openwrt.git] / package / e2fsprogs / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=e2fsprogs
12 PKG_VERSION:=1.39
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
17 PKG_MD5SUM:=06f7806782e357797fad1d34b7ced0c6
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/e2fsprogs
22 SECTION:=utils
23 CATEGORY:=Utilities
24 TITLE:=Ext2/3 filesystem utilities
25 DEPENDS:=+libblkid +libuuid
26 DESCRIPTION:=\
27 This package contains essential ext2 filesystem utilities which consists of \\\
28 e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2 \\\
29 filesystem utilities.
30 endef
31
32 define Package/libuuid
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=DCE compatible Universally Unique Identifier library
36 DESCRIPTION:=\
37 Library for generating DCE compatible Universally Unique Identifiers
38 URL:=http://e2fsprogs.sourceforge.net/
39 endef
40
41 define Package/libblkid
42 SECTION:=libs
43 CATEGORY:=Libraries
44 TITLE:=block device id library
45 DESCRIPTION:=\
46 The blkid library which allows system programs like fsck and mount to quickly\\\
47 and easily find block devices by filesystem UUID and LABEL.
48 URL:=http://e2fsprogs.sourceforge.net/
49 endef
50
51 define Package/tune2fs
52 $(call Package/e2fsprogs)
53 TITLE:=Ext2 Filesystem tune utility
54 DESCRIPTION:=Ext2 Filesystem tune utility
55 DEPENDS:=e2fsprogs
56 endef
57
58 define Package/resize2fs
59 $(call Package/e2fsprogs)
60 TITLE:=Ext2 Filesystem resize utility
61 DESCRIPTION:=Ext2 Filesystem resize utility
62 DEPENDS:=e2fsprogs
63 endef
64
65 CONFIGURE_ARGS += \
66 --enable-shared \
67 --enable-static \
68 --disable-rpath \
69 --enable-elf-shlibs \
70 --enable-dynamic-e2fsck
71
72 define Build/Prepare
73 $(call Build/Prepare/Default)
74 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
75 endef
76
77 define Build/Compile
78 $(MAKE) -C $(PKG_BUILD_DIR)/util \
79 BUILDCC="$(HOSTCC)" \
80 CFLAGS="" \
81 CPPFLAGS="" \
82 LDFLAGS="" \
83 subst
84 $(MAKE) -C $(PKG_BUILD_DIR) \
85 BUILDCC="$(HOSTCC)" \
86 DESTDIR="$(PKG_INSTALL_DIR)" \
87 all install
88 endef
89
90 define Build/InstallDev
91 $(MAKE) -C $(PKG_BUILD_DIR) \
92 BUILDCC="$(HOSTCC)" \
93 DESTDIR="$(STAGING_DIR)" \
94 install-libs
95 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/{blkid,com_err,e2p,ext2fs,ss,uuid}.pc
96 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/{blkid,com_err,e2p,ext2fs,ss,uuid}.pc
97 endef
98
99 define Build/UninstallDev
100 -$(MAKE) -C $(PKG_BUILD_DIR) \
101 BUILDCC="$(HOSTCC)" \
102 DESTDIR="$(STAGING_DIR)" \
103 uninstall-libs
104 endef
105
106 define Package/e2fsprogs/install
107 $(INSTALL_DIR) $(1)/usr/sbin
108 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
109 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
110 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
111 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(CP) $(foreach lib,com_err e2p ext2fs,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
114 endef
115
116 define Package/libuuid/install
117 $(INSTALL_DIR) $(1)/usr/lib
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
119 endef
120
121 define Package/libblkid/install
122 $(INSTALL_DIR) $(1)/usr/lib/
123 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
124 endef
125
126 define Package/tune2fs/install
127 $(INSTALL_DIR) $(1)/usr/sbin
128 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
129 endef
130
131 define Package/resize2fs/install
132 $(INSTALL_DIR) $(1)/usr/sbin
133 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
134 endef
135
136 $(eval $(call BuildPackage,e2fsprogs))
137 $(eval $(call BuildPackage,libuuid))
138 $(eval $(call BuildPackage,libblkid))
139 $(eval $(call BuildPackage,tune2fs))
140 $(eval $(call BuildPackage,resize2fs))
This page took 0.051548 seconds and 5 git commands to generate.