[package] e2fsprogs: update to 1.42.3
[openwrt/svn-archive/archive.git] / package / e2fsprogs / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 # Copyright 2010 Vertical Communications
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=e2fsprogs
11 PKG_VERSION:=1.42.3
12 PKG_MD5SUM:=73431146f58d40fe1375aba2060f0da8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
17
18 PKG_BUILD_DEPENDS:=util-linux
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/e2fsprogs/Default
24 URL:=http://e2fsprogs.sourceforge.net/
25 SUBMENU:=Filesystem
26 endef
27
28 define Package/e2fsprogs
29 $(call Package/e2fsprogs/Default)
30 SECTION:=utils
31 CATEGORY:=Utilities
32 TITLE:=Ext2/3/4 filesystem utilities
33 DEPENDS:=+libblkid +libuuid +libext2fs +libpthread +libcom_err
34 endef
35
36 define Package/e2fsprogs/description
37 This package contains essential ext2 filesystem utilities which consists of
38 e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2
39 filesystem utilities.
40 endef
41
42 define Package/libext2fs
43 $(call Package/e2fsprogs/Default)
44 SECTION:=libs
45 CATEGORY:=Libraries
46 TITLE:=ext2/3/4 filesystem library
47 endef
48
49 define Package/libext2fs/description
50 libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
51 endef
52
53 define Package/libcom_err
54 $(call Package/e2fsprogs/Default)
55 SECTION:=libs
56 CATEGORY:=Libraries
57 TITLE:=Common error description library
58 endef
59
60 define Package/libcom_err/description
61 libcom_err is a library providing common error descriptions
62 endef
63
64 define Package/tune2fs
65 $(call Package/e2fsprogs)
66 TITLE:=Ext2 Filesystem tune utility
67 DEPENDS:= +e2fsprogs
68 endef
69
70 define Package/resize2fs
71 $(call Package/e2fsprogs)
72 TITLE:=Ext2 Filesystem resize utility
73 DEPENDS:= +e2fsprogs
74 endef
75
76 define Package/badblocks
77 $(call Package/e2fsprogs)
78 TITLE:=Ext2 Filesystem badblocks utility
79 DEPENDS:= +e2fsprogs
80 endef
81
82 TARGET_CFLAGS += $(FPIC)
83
84 CONFIGURE_ARGS += \
85 --enable-elf-shlibs \
86 --disable-libuuid \
87 --disable-libblkid \
88 --disable-uuidd \
89 --disable-tls \
90 --disable-nls \
91 --disable-rpath
92
93 define Build/Prepare
94 $(call Build/Prepare/Default)
95 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
96 endef
97
98 define Build/Compile
99 $(MAKE) -C $(PKG_BUILD_DIR)/util \
100 BUILDCC="$(HOSTCC)" \
101 CFLAGS="" \
102 CPPFLAGS="" \
103 LDFLAGS="" \
104 subst
105 $(MAKE) -C $(PKG_BUILD_DIR) \
106 BUILDCC="$(HOSTCC)" \
107 DESTDIR="$(PKG_INSTALL_DIR)" \
108 all
109 endef
110
111 define Build/InstallDev
112 $(MAKE) -C $(PKG_BUILD_DIR) \
113 BUILDCC="$(HOSTCC)" \
114 DESTDIR="$(1)" \
115 install-libs
116 $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
117 BUILDCC="$(HOSTCC)" \
118 DESTDIR="$(1)" \
119 install
120 endef
121
122 define Package/e2fsprogs/install
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
126 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
127 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
128 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
129 $(INSTALL_DIR) $(1)/usr/lib
130 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
131 $(INSTALL_DIR) $(1)/etc/init.d
132 $(INSTALL_DIR) $(1)/lib/functions/fsck
133 $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
134 $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
135 endef
136
137 define Package/libcom_err/install
138 $(INSTALL_DIR) $(1)/usr/lib
139 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* $(1)/usr/lib/
140 endef
141
142 define Package/libext2fs/install
143 $(INSTALL_DIR) $(1)/usr/lib
144 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
145 endef
146
147 define Package/tune2fs/install
148 $(INSTALL_DIR) $(1)/usr/sbin
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
150 endef
151
152 define Package/resize2fs/install
153 $(INSTALL_DIR) $(1)/usr/sbin
154 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
155 endef
156
157 define Package/badblocks/install
158 $(INSTALL_DIR) $(1)/usr/sbin
159 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
160 endef
161
162 $(eval $(call BuildPackage,e2fsprogs))
163 $(eval $(call BuildPackage,libext2fs))
164 $(eval $(call BuildPackage,libcom_err))
165 $(eval $(call BuildPackage,tune2fs))
166 $(eval $(call BuildPackage,resize2fs))
167 $(eval $(call BuildPackage,badblocks))