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.
8 include $(TOPDIR)/rules.mk
12 PKG_MD5SUM:=b6e296f210d642361b7394437ff0f318
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
18 PKG_BUILD_DEPENDS:=util-linux
21 include $(INCLUDE_DIR)/package.mk
23 define Package/e2fsprogs/Default
24 URL:=http://e2fsprogs.sourceforge.net/
28 define Package/e2fsprogs
29 $(call Package/e2fsprogs/Default)
32 TITLE:=Ext2/3/4 filesystem utilities
33 DEPENDS:=+libuuid +libext2fs
36 define Package/e2fsprogs/description
37 This package contains essential ext2 filesystem utilities which consists of
38 e2fsck, mke2fs, tune2fs, and most of the other core ext2
42 define Package/libext2fs
43 $(call Package/e2fsprogs/Default)
47 TITLE:=ext2/3/4 filesystem library
50 define Package/libext2fs/description
51 libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
54 define Package/libcom_err
55 $(call Package/e2fsprogs/Default)
59 TITLE:=Common error description library
62 define Package/libcom_err/description
63 libcom_err is a library providing common error descriptions
66 define Package/tune2fs
67 $(call Package/e2fsprogs)
68 TITLE:=Ext2 Filesystem tune utility
72 define Package/resize2fs
73 $(call Package/e2fsprogs)
74 TITLE:=Ext2 Filesystem resize utility
78 define Package/badblocks
79 $(call Package/e2fsprogs)
80 TITLE:=Ext2 Filesystem badblocks utility
84 TARGET_CFLAGS += $(FPIC)
96 $(call Build/Prepare/Default)
97 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
101 $(MAKE) -C $(PKG_BUILD_DIR)/util \
102 BUILDCC="$(HOSTCC)" \
107 $(MAKE) -C $(PKG_BUILD_DIR) \
108 BUILDCC="$(HOSTCC)" \
109 DESTDIR="$(PKG_INSTALL_DIR)" \
110 LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \
114 define Build/InstallDev
115 $(MAKE) -C $(PKG_BUILD_DIR) \
116 BUILDCC="$(HOSTCC)" \
119 $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
120 BUILDCC="$(HOSTCC)" \
125 define Package/e2fsprogs/install
126 $(INSTALL_DIR) $(1)/usr/sbin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
128 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
129 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
130 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
131 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
132 $(INSTALL_DIR) $(1)/usr/lib
133 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
134 $(INSTALL_DIR) $(1)/etc/init.d
135 $(INSTALL_DIR) $(1)/lib/functions/fsck
136 $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
137 $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
140 define Package/libcom_err/install
141 $(INSTALL_DIR) $(1)/usr/lib
142 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* $(1)/usr/lib/
145 define Package/libext2fs/install
146 $(INSTALL_DIR) $(1)/usr/lib
147 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
150 define Package/tune2fs/install
151 $(INSTALL_DIR) $(1)/usr/sbin
152 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
155 define Package/resize2fs/install
156 $(INSTALL_DIR) $(1)/usr/sbin
157 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
160 define Package/badblocks/install
161 $(INSTALL_DIR) $(1)/usr/sbin
162 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
165 $(eval $(call BuildPackage,e2fsprogs))
166 $(eval $(call BuildPackage,libext2fs))
167 $(eval $(call BuildPackage,libcom_err))
168 $(eval $(call BuildPackage,tune2fs))
169 $(eval $(call BuildPackage,resize2fs))
170 $(eval $(call BuildPackage,badblocks))