2 # Copyright (C) 2006-2014 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.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@KERNEL
/linux
/kernel
/people
/tytso
/e2fsprogs
/v
$(PKG_VERSION
)/
16 PKG_HASH
:=144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db
19 PKG_LICENSE_FILES
:=NOTICE
20 PKG_CPE_ID
:=cpe
:/a
:e2fsprogs_project
:e2fsprogs
22 PKG_BUILD_DEPENDS
:=util-linux e2fsprogs
/host
26 PKG_BUILD_FLAGS
:=gc-sections lto
28 include $(INCLUDE_DIR
)/package.mk
29 include $(INCLUDE_DIR
)/host-build.mk
31 define Package
/e2fsprogs
35 TITLE
:=Ext2
/3/4 filesystem utilities
36 URL
:=http
://e2fsprogs.sourceforge.net
/
37 DEPENDS
:=+libuuid
+libext2fs
40 define Package
/e2fsprogs
/description
41 This package contains essential ext2 filesystem utilities which consists of
42 e2fsck
, mke2fs and most of the other core ext2 filesystem utilities.
45 define Package
/libext2fs
48 TITLE
:=ext2
/3/4 filesystem library
49 URL
:=http
://e2fsprogs.sourceforge.net
/
50 DEPENDS
:=+libuuid
+libblkid
+libss
+libcomerr
54 define Package
/libext2fs
/description
55 libext2fs is a library which can access ext2
, ext3 and ext4 filesystems.
61 TITLE
:=command-line interface parsing library
62 URL
:=http
://e2fsprogs.sourceforge.net
/
67 define Package
/libss
/description
68 This pacakge contains libss
, a command-line interface parsing library
69 bundled with e2fsprogs.
72 define Package
/libcomerr
75 TITLE
:=common error description library
76 URL
:=http
://e2fsprogs.sourceforge.net
/
81 define Package
/libcomerr
/description
82 This package contains libcom_err
, the common error description library
83 bundled with e2fsprogs.
86 define Package
/tune2fs
87 $(call Package
/e2fsprogs
)
88 TITLE
:=Ext2 Filesystem tune utility
92 define Package
/resize2fs
93 $(call Package
/e2fsprogs
)
94 TITLE
:=Ext2 Filesystem resize utility
98 define Package
/badblocks
99 $(call Package
/e2fsprogs
)
100 TITLE
:=Ext2 Filesystem badblocks utility
104 define Package
/dumpe2fs
105 $(call Package
/e2fsprogs
)
106 TITLE
:=Ext2 Filesystem information dumping utility
110 define Package
/e2freefrag
111 $(call Package
/e2fsprogs
)
112 TITLE
:=Ext2 Filesystem free space fragmentation information utility
116 define Package
/e4crypt
117 $(call Package
/e2fsprogs
)
118 TITLE
:=Ext4 Filesystem encryption utility
122 define Package
/filefrag
123 $(call Package
/e2fsprogs
)
124 TITLE
:=Ext2 Filesystem file fragmentation report utility
128 define Package
/debugfs
129 $(call Package
/e2fsprogs
)
130 TITLE
:=Ext2 Filesystem debugger
134 define Package
/chattr
135 $(call Package
/e2fsprogs
)
136 TITLE
:=Ext2 Filesystem chattr utility
140 define Package
/lsattr
141 $(call Package
/e2fsprogs
)
142 TITLE
:=Ext2 Filesystem lsattr utility
146 TARGET_CFLAGS
+= $(FPIC
)
149 --disable-testio-debug \
150 --enable-elf-shlibs \
160 $(call Build
/Prepare
/Default
)
161 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/config
/
165 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/util \
166 BUILDCC
="$(HOSTCC)" \
170 V
=$(if
$(findstring c
,$(OPENWRT_VERBOSE
)),1,) \
172 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
173 BUILDCC
="$(HOSTCC)" \
174 DESTDIR
="$(PKG_INSTALL_DIR)" \
175 ELF_OTHER_LIBS
="$(TARGET_LDFLAGS) -luuid" \
176 SYSLIBS
="$(TARGET_LDFLAGS) -ldl -L$(PKG_BUILD_DIR)/lib/ -l:libcom_err.so.0.0" \
177 V
=$(if
$(findstring c
,$(OPENWRT_VERBOSE
)),1,) \
181 define Build
/InstallDev
182 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
183 $(CP
) $(PKG_BUILD_DIR
)/lib
/ext2fs
/ext2fs.
pc $(1)/usr
/lib
/pkgconfig
184 $(CP
) $(PKG_BUILD_DIR
)/lib
/et
/com_err.
pc $(1)/usr
/lib
/pkgconfig
186 $(INSTALL_DIR
) $(1)/usr
/lib
187 $(CP
) $(PKG_BUILD_DIR
)/lib
/libext2fs.
{so
,a
}* $(1)/usr
/lib
188 $(CP
) $(PKG_BUILD_DIR
)/lib
/libcom_err.
{so
,a
}* $(1)/usr
/lib
189 $(CP
) $(PKG_BUILD_DIR
)/lib
/libss.
{so
,a
}* $(1)/usr
/lib
191 $(INSTALL_DIR
) $(1)/usr
/include/ext2fs
192 $(CP
) $(PKG_BUILD_DIR
)/lib
/ext2fs
/*.h
$(1)/usr
/include/ext2fs
193 $(INSTALL_DIR
) $(1)/usr
/include/et
194 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/et
/*.h
$(1)/usr
/include/et
195 # Apparently there is some confusion
196 echo
"#include <et/com_err.h>" > $(1)/usr
/include/com_err.h
197 $(INSTALL_DIR
) $(1)/usr
/include/ss
199 $(PKG_BUILD_DIR
)/lib
/ss
/ss.h \
200 $(PKG_BUILD_DIR
)/lib
/ss
/ss_err.h \
205 $(MAKE
) $(PKG_JOBS
) -C
$(HOST_BUILD_DIR
)/lib
/ss mk_cmds
206 $(MAKE
) $(PKG_JOBS
) -C
$(HOST_BUILD_DIR
)/lib
/et compile_et
210 $(INSTALL_DIR
) $(1)/share
/et
211 $(CP
) $(HOST_BUILD_DIR
)/lib
/et
/et_
[ch
].awk
$(1)/share
/et
/
212 $(INSTALL_DIR
) $(1)/share
/ss
213 $(CP
) $(HOST_BUILD_DIR
)/lib
/ss
/ct_c.
{sed
,awk
} $(1)/share
/ss
/
214 $(INSTALL_DIR
) $(1)/bin
216 $(HOST_BUILD_DIR
)/lib
/et
/compile_et \
217 $(HOST_BUILD_DIR
)/lib
/ss
/mk_cmds \
221 define Package
/e2fsprogs
/conffiles
225 define Package
/e2fsprogs
/install
226 $(INSTALL_DIR
) $(1)/usr
/sbin
227 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/e2fsck
$(1)/usr
/sbin
/
228 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/mke2fs
$(1)/usr
/sbin
/
229 $(LN
) mke2fs
$(1)/usr
/sbin
/mkfs.ext2
230 $(LN
) mke2fs
$(1)/usr
/sbin
/mkfs.ext3
231 $(LN
) mke2fs
$(1)/usr
/sbin
/mkfs.ext4
232 $(LN
) e2fsck
$(1)/usr
/sbin
/fsck.ext2
233 $(LN
) e2fsck
$(1)/usr
/sbin
/fsck.ext3
234 $(LN
) e2fsck
$(1)/usr
/sbin
/fsck.ext4
235 $(INSTALL_DIR
) $(1)/usr
/lib
236 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libe2p.so.
* $(1)/usr
/lib
/
237 $(INSTALL_DIR
) $(1)/etc
/init.d
238 $(INSTALL_DIR
) $(1)/lib
/functions
/fsck
239 $(INSTALL_DATA
) .
/files
/e2fsck.sh
$(1)/lib
/functions
/fsck
/
240 $(INSTALL_DATA
) .
/files
/e2fsck.conf
$(1)/etc
/e2fsck.conf
243 define Package
/libcomerr
/install
244 $(INSTALL_DIR
) $(1)/usr
/lib
245 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcom_err.so.
* $(1)/usr
/lib
/
248 define Package
/libss
/install
249 $(INSTALL_DIR
) $(1)/usr
/lib
250 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libss.so.
* $(1)/usr
/lib
/
253 define Package
/libext2fs
/install
254 $(INSTALL_DIR
) $(1)/usr
/lib
255 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libext2fs.so.
* $(1)/usr
/lib
/
258 define Package
/libext2fs
/install_lib
259 $(INSTALL_DIR
) $(1)/usr
/lib
260 $(CP
) $(PKG_BUILD_DIR
)/lib
/ext2fs
/libext2fs.a
$(1)/usr
/lib
/libext2fs_pic.a
263 define Package
/tune2fs
/install
264 $(INSTALL_DIR
) $(1)/usr
/sbin
265 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/tune2fs
$(1)/usr
/sbin
/
266 $(LN
) tune2fs
$(1)/usr
/sbin
/findfs
269 define Package
/resize2fs
/install
270 $(INSTALL_DIR
) $(1)/usr
/sbin
271 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/resize2fs
$(1)/usr
/sbin
/
274 define Package
/badblocks
/install
275 $(INSTALL_DIR
) $(1)/usr
/sbin
276 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/badblocks
$(1)/usr
/sbin
/
279 define Package
/dumpe2fs
/install
280 $(INSTALL_DIR
) $(1)/usr
/sbin
281 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/dumpe2fs
$(1)/usr
/sbin
/
284 define Package
/e2freefrag
/install
285 $(INSTALL_DIR
) $(1)/usr
/sbin
286 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/e2freefrag
$(1)/usr
/sbin
/
289 define Package
/e4crypt
/install
290 $(INSTALL_DIR
) $(1)/usr
/sbin
291 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/e4crypt
$(1)/usr
/sbin
/
294 define Package
/filefrag
/install
295 $(INSTALL_DIR
) $(1)/usr
/sbin
296 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/filefrag
$(1)/usr
/sbin
/
299 define Package
/debugfs
/install
300 $(INSTALL_DIR
) $(1)/usr
/sbin
301 $(INSTALL_DIR
) $(1)/usr
/lib
302 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/debugfs
$(1)/usr
/sbin
/
305 define Package
/chattr
/install
306 $(INSTALL_DIR
) $(1)/usr
/bin
307 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/chattr
$(1)/usr
/bin
/
310 define Package
/lsattr
/install
311 $(INSTALL_DIR
) $(1)/usr
/bin
312 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/lsattr
$(1)/usr
/bin
/
315 $(eval
$(call BuildPackage
,libcomerr
))
316 $(eval
$(call BuildPackage
,libss
))
317 $(eval
$(call BuildPackage
,libext2fs
))
318 $(eval
$(call BuildPackage
,e2fsprogs
))
319 $(eval
$(call BuildPackage
,tune2fs
))
320 $(eval
$(call BuildPackage
,resize2fs
))
321 $(eval
$(call BuildPackage
,badblocks
))
322 $(eval
$(call BuildPackage
,dumpe2fs
))
323 $(eval
$(call BuildPackage
,e2freefrag
))
324 $(eval
$(call BuildPackage
,e4crypt
))
325 $(eval
$(call BuildPackage
,filefrag
))
326 $(eval
$(call BuildPackage
,debugfs
))
327 $(eval
$(call BuildPackage
,chattr
))
328 $(eval
$(call BuildPackage
,lsattr
))
329 $(eval
$(call HostBuild
))