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
:=2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e
19 PKG_LICENSE_FILES
:=NOTICE
20 PKG_CPE_ID
:=cpe
:/a
:e2fsprogs_project
:e2fsprogs
22 PKG_BUILD_DEPENDS
:=util-linux e2fsprogs
/host
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/host-build.mk
30 define Package
/e2fsprogs
34 TITLE
:=Ext2
/3/4 filesystem utilities
35 URL
:=http
://e2fsprogs.sourceforge.net
/
36 DEPENDS
:=+libuuid
+libext2fs
39 define Package
/e2fsprogs
/description
40 This package contains essential ext2 filesystem utilities which consists of
41 e2fsck
, mke2fs and most of the other core ext2 filesystem utilities.
44 define Package
/libext2fs
47 TITLE
:=ext2
/3/4 filesystem library
48 URL
:=http
://e2fsprogs.sourceforge.net
/
49 DEPENDS
:=+libuuid
+libblkid
+libss
+libcomerr
53 define Package
/libext2fs
/description
54 libext2fs is a library which can access ext2
, ext3 and ext4 filesystems.
60 TITLE
:=command-line interface parsing library
61 URL
:=http
://e2fsprogs.sourceforge.net
/
66 define Package
/libss
/description
67 This pacakge contains libss
, a command-line interface parsing library
68 bundled with e2fsprogs.
71 define Package
/libcomerr
74 TITLE
:=common error description library
75 URL
:=http
://e2fsprogs.sourceforge.net
/
80 define Package
/libcomerr
/description
81 This package contains libcom_err
, the common error description library
82 bundled with e2fsprogs.
85 define Package
/tune2fs
86 $(call Package
/e2fsprogs
)
87 TITLE
:=Ext2 Filesystem tune utility
91 define Package
/resize2fs
92 $(call Package
/e2fsprogs
)
93 TITLE
:=Ext2 Filesystem resize utility
97 define Package
/badblocks
98 $(call Package
/e2fsprogs
)
99 TITLE
:=Ext2 Filesystem badblocks utility
103 define Package
/dumpe2fs
104 $(call Package
/e2fsprogs
)
105 TITLE
:=Ext2 Filesystem information dumping utility
109 define Package
/e2freefrag
110 $(call Package
/e2fsprogs
)
111 TITLE
:=Ext2 Filesystem free space fragmentation information utility
115 define Package
/e4crypt
116 $(call Package
/e2fsprogs
)
117 TITLE
:=Ext4 Filesystem encryption utility
121 define Package
/filefrag
122 $(call Package
/e2fsprogs
)
123 TITLE
:=Ext2 Filesystem file fragmentation report utility
127 define Package
/debugfs
128 $(call Package
/e2fsprogs
)
129 TITLE
:=Ext2 Filesystem debugger
133 define Package
/chattr
134 $(call Package
/e2fsprogs
)
135 TITLE
:=Ext2 Filesystem chattr utility
139 define Package
/lsattr
140 $(call Package
/e2fsprogs
)
141 TITLE
:=Ext2 Filesystem lsattr utility
145 TARGET_CFLAGS
+= $(FPIC
) -ffunction-sections
-fdata-sections
-flto
147 TARGET_LDFLAGS
+= -flto
150 --disable-testio-debug \
151 --enable-elf-shlibs \
161 $(call Build
/Prepare
/Default
)
162 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/config
/
166 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/util \
167 BUILDCC
="$(HOSTCC)" \
171 V
=$(if
$(findstring c
,$(OPENWRT_VERBOSE
)),1,) \
173 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
174 LDFLAGS
=-Wl
,--gc-sections \
175 BUILDCC
="$(HOSTCC)" \
176 DESTDIR
="$(PKG_INSTALL_DIR)" \
177 ELF_OTHER_LIBS
="$(TARGET_LDFLAGS) -luuid" \
178 SYSLIBS
="$(TARGET_LDFLAGS) -ldl -L$(PKG_BUILD_DIR)/lib/ -l:libcom_err.so.0.0" \
179 V
=$(if
$(findstring c
,$(OPENWRT_VERBOSE
)),1,) \
183 define Build
/InstallDev
184 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
185 $(CP
) $(PKG_BUILD_DIR
)/lib
/ext2fs
/ext2fs.
pc $(1)/usr
/lib
/pkgconfig
186 $(CP
) $(PKG_BUILD_DIR
)/lib
/et
/com_err.
pc $(1)/usr
/lib
/pkgconfig
188 $(INSTALL_DIR
) $(1)/usr
/lib
189 $(CP
) $(PKG_BUILD_DIR
)/lib
/libext2fs.
{so
,a
}* $(1)/usr
/lib
190 $(CP
) $(PKG_BUILD_DIR
)/lib
/libcom_err.
{so
,a
}* $(1)/usr
/lib
191 $(CP
) $(PKG_BUILD_DIR
)/lib
/libss.
{so
,a
}* $(1)/usr
/lib
193 $(INSTALL_DIR
) $(1)/usr
/include/ext2fs
194 $(CP
) $(PKG_BUILD_DIR
)/lib
/ext2fs
/*.h
$(1)/usr
/include/ext2fs
195 $(INSTALL_DIR
) $(1)/usr
/include/et
196 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/et
/*.h
$(1)/usr
/include/et
197 # Apparently there is some confusion
198 echo
"#include <et/com_err.h>" > $(1)/usr
/include/com_err.h
199 $(INSTALL_DIR
) $(1)/usr
/include/ss
201 $(PKG_BUILD_DIR
)/lib
/ss
/ss.h \
202 $(PKG_BUILD_DIR
)/lib
/ss
/ss_err.h \
207 $(MAKE
) $(PKG_JOBS
) -C
$(HOST_BUILD_DIR
)/lib
/ss mk_cmds
208 $(MAKE
) $(PKG_JOBS
) -C
$(HOST_BUILD_DIR
)/lib
/et compile_et
212 $(INSTALL_DIR
) $(1)/share
/et
213 $(CP
) $(HOST_BUILD_DIR
)/lib
/et
/et_
[ch
].awk
$(1)/share
/et
/
214 $(INSTALL_DIR
) $(1)/share
/ss
215 $(CP
) $(HOST_BUILD_DIR
)/lib
/ss
/ct_c.
{sed
,awk
} $(1)/share
/ss
/
216 $(INSTALL_DIR
) $(1)/bin
218 $(HOST_BUILD_DIR
)/lib
/et
/compile_et \
219 $(HOST_BUILD_DIR
)/lib
/ss
/mk_cmds \
223 define Package
/e2fsprogs
/conffiles
227 define Package
/e2fsprogs
/install
228 $(INSTALL_DIR
) $(1)/usr
/sbin
229 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/e2fsck
$(1)/usr
/sbin
/
230 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/mke2fs
$(1)/usr
/sbin
/
231 $(LN
) mke2fs
$(1)/usr
/sbin
/mkfs.ext2
232 $(LN
) mke2fs
$(1)/usr
/sbin
/mkfs.ext3
233 $(LN
) mke2fs
$(1)/usr
/sbin
/mkfs.ext4
234 $(LN
) e2fsck
$(1)/usr
/sbin
/fsck.ext2
235 $(LN
) e2fsck
$(1)/usr
/sbin
/fsck.ext3
236 $(LN
) e2fsck
$(1)/usr
/sbin
/fsck.ext4
237 $(INSTALL_DIR
) $(1)/usr
/lib
238 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libe2p.so.
* $(1)/usr
/lib
/
239 $(INSTALL_DIR
) $(1)/etc
/init.d
240 $(INSTALL_DIR
) $(1)/lib
/functions
/fsck
241 $(INSTALL_DATA
) .
/files
/e2fsck.sh
$(1)/lib
/functions
/fsck
/
242 $(INSTALL_DATA
) .
/files
/e2fsck.conf
$(1)/etc
/e2fsck.conf
245 define Package
/libcomerr
/install
246 $(INSTALL_DIR
) $(1)/usr
/lib
247 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcom_err.so.
* $(1)/usr
/lib
/
250 define Package
/libss
/install
251 $(INSTALL_DIR
) $(1)/usr
/lib
252 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libss.so.
* $(1)/usr
/lib
/
255 define Package
/libext2fs
/install
256 $(INSTALL_DIR
) $(1)/usr
/lib
257 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libext2fs.so.
* $(1)/usr
/lib
/
260 define Package
/libext2fs
/install_lib
261 $(INSTALL_DIR
) $(1)/usr
/lib
262 $(CP
) $(PKG_BUILD_DIR
)/lib
/ext2fs
/libext2fs.a
$(1)/usr
/lib
/libext2fs_pic.a
265 define Package
/tune2fs
/install
266 $(INSTALL_DIR
) $(1)/usr
/sbin
267 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/tune2fs
$(1)/usr
/sbin
/
268 $(LN
) tune2fs
$(1)/usr
/sbin
/findfs
271 define Package
/resize2fs
/install
272 $(INSTALL_DIR
) $(1)/usr
/sbin
273 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/resize2fs
$(1)/usr
/sbin
/
276 define Package
/badblocks
/install
277 $(INSTALL_DIR
) $(1)/usr
/sbin
278 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/badblocks
$(1)/usr
/sbin
/
281 define Package
/dumpe2fs
/install
282 $(INSTALL_DIR
) $(1)/usr
/sbin
283 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/dumpe2fs
$(1)/usr
/sbin
/
286 define Package
/e2freefrag
/install
287 $(INSTALL_DIR
) $(1)/usr
/sbin
288 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/e2freefrag
$(1)/usr
/sbin
/
291 define Package
/e4crypt
/install
292 $(INSTALL_DIR
) $(1)/usr
/sbin
293 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/e4crypt
$(1)/usr
/sbin
/
296 define Package
/filefrag
/install
297 $(INSTALL_DIR
) $(1)/usr
/sbin
298 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/filefrag
$(1)/usr
/sbin
/
301 define Package
/debugfs
/install
302 $(INSTALL_DIR
) $(1)/usr
/sbin
303 $(INSTALL_DIR
) $(1)/usr
/lib
304 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/debugfs
$(1)/usr
/sbin
/
307 define Package
/chattr
/install
308 $(INSTALL_DIR
) $(1)/usr
/bin
309 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/chattr
$(1)/usr
/bin
/
312 define Package
/lsattr
/install
313 $(INSTALL_DIR
) $(1)/usr
/bin
314 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/lsattr
$(1)/usr
/bin
/
317 $(eval
$(call BuildPackage
,libcomerr
))
318 $(eval
$(call BuildPackage
,libss
))
319 $(eval
$(call BuildPackage
,libext2fs
))
320 $(eval
$(call BuildPackage
,e2fsprogs
))
321 $(eval
$(call BuildPackage
,tune2fs
))
322 $(eval
$(call BuildPackage
,resize2fs
))
323 $(eval
$(call BuildPackage
,badblocks
))
324 $(eval
$(call BuildPackage
,dumpe2fs
))
325 $(eval
$(call BuildPackage
,e2freefrag
))
326 $(eval
$(call BuildPackage
,e4crypt
))
327 $(eval
$(call BuildPackage
,filefrag
))
328 $(eval
$(call BuildPackage
,debugfs
))
329 $(eval
$(call BuildPackage
,chattr
))
330 $(eval
$(call BuildPackage
,lsattr
))
331 $(eval
$(call HostBuild
))