Root/package/e2fsprogs/Makefile

Source at commit 7bc978b created 13 years 8 months ago.
By cshore, block-extroot, block-mount: Fixed multiple bugs which prevented e2fsck from being executed on the external root filesystem before mounting it as root. Added /etc/e2fsck.conf which indicates that the clock is broken (since most OpenWRT devices don't have a battery backed RTC) so that e2fsck will not exit with fatal error when the rdat has not yet been run (i.e. before network).
1#
2# Copyright (C) 2006-2008 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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=e2fsprogs
11PKG_VERSION:=1.41.11
12PKG_MD5SUM:=fb507a40c2706bc38306f150d069e345
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=@SF/e2fsprogs
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/e2fsprogs/Default
21  URL:=http://e2fsprogs.sourceforge.net/
22  SUBMENU:=Filesystem
23endef
24
25define Package/e2fsprogs
26$(call Package/e2fsprogs/Default)
27  SECTION:=utils
28  CATEGORY:=Utilities
29  TITLE:=Ext2/3/4 filesystem utilities
30  DEPENDS:=+libblkid +libuuid +libext2fs +libpthread
31endef
32
33define Package/e2fsprogs/description
34 This package contains essential ext2 filesystem utilities which consists of
35 e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2
36 filesystem utilities.
37endef
38
39define Package/libuuid
40$(call Package/e2fsprogs/Default)
41  SECTION:=libs
42  CATEGORY:=Libraries
43  TITLE:=DCE compatible Universally Unique Identifier library
44endef
45
46define Package/libuuid/description
47 Library for generating DCE compatible Universally Unique Identifiers.
48endef
49
50define Package/uuidgen
51$(call Package/e2fsprogs)
52  DEPENDS:=+libuuid
53  TITLE:=Command line utility to create a new UUID value
54endef
55
56define Package/uuidgen/description
57 uuidgen program creates a new universally unique identifier (UUID)
58 using the libuuid library. The new UUID can reasonably be considered
59 unique among all UUIDs created on the local system, and among UUIDs
60 created on other systems in the past and in the future.
61endef
62
63define Package/libblkid
64$(call Package/e2fsprogs/Default)
65  SECTION:=libs
66  CATEGORY:=Libraries
67  TITLE:=block device id library
68endef
69
70define Package/libblkid/description
71 The blkid library which allows system programs like fsck and mount to
72 quickly and easily find block devices by filesystem UUID and LABEL.
73endef
74
75define Package/libext2fs
76$(call Package/e2fsprogs/Default)
77  SECTION:=libs
78  CATEGORY:=Libraries
79  TITLE:=ext2/3/4 filesystem library
80endef
81
82define Package/libext2fs/description
83libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
84endef
85
86define Package/tune2fs
87$(call Package/e2fsprogs)
88  TITLE:=Ext2 Filesystem tune utility
89  DEPENDS:= +e2fsprogs
90endef
91
92define Package/resize2fs
93$(call Package/e2fsprogs)
94  TITLE:=Ext2 Filesystem resize utility
95  DEPENDS:= +e2fsprogs
96endef
97
98define Package/badblocks
99$(call Package/e2fsprogs)
100  TITLE:=Ext2 Filesystem badblocks utility
101  DEPENDS:= +e2fsprogs
102endef
103
104define Package/blkid
105$(call Package/e2fsprogs)
106  TITLE:=Command-line utility to locate/print block device attributes
107  DEPENDS:=+libuuid +libblkid
108endef
109
110TARGET_CFLAGS += $(FPIC)
111
112CONFIGURE_ARGS += \
113    --enable-shared \
114    --enable-static \
115    --disable-rpath \
116    --enable-elf-shlibs \
117    --enable-dynamic-e2fsck \
118    --disable-tls
119
120define Build/Prepare
121    $(call Build/Prepare/Default)
122    $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
123endef
124
125define Build/Compile
126    $(MAKE) -C $(PKG_BUILD_DIR)/util \
127        BUILDCC="$(HOSTCC)" \
128        CFLAGS="" \
129        CPPFLAGS="" \
130        LDFLAGS="" \
131        subst
132    $(MAKE) -C $(PKG_BUILD_DIR) \
133        BUILDCC="$(HOSTCC)" \
134        DESTDIR="$(PKG_INSTALL_DIR)" \
135        all install
136endef
137
138define Build/InstallDev
139    $(MAKE) -C $(PKG_BUILD_DIR) \
140        BUILDCC="$(HOSTCC)" \
141        DESTDIR="$(1)" \
142        install-libs
143    $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
144        BUILDCC="$(HOSTCC)" \
145        DESTDIR="$(1)" \
146        install
147endef
148
149define Package/e2fsprogs/install
150    $(INSTALL_DIR) $(1)/usr/sbin
151    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
152    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
153    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
154    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
155    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
156    $(INSTALL_DIR) $(1)/usr/lib
157    $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
158    $(INSTALL_DIR) $(1)/etc/init.d
159    $(INSTALL_DIR) $(1)/lib/functions/fsck
160    $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
161    $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
162endef
163
164define Package/libuuid/install
165    $(INSTALL_DIR) $(1)/usr/lib
166    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
167endef
168
169define Package/uuidgen/install
170    $(INSTALL_DIR) $(1)/usr/bin
171    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
172endef
173
174define Package/libblkid/install
175    $(INSTALL_DIR) $(1)/usr/lib
176    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
177endef
178
179define Package/libext2fs/install
180    $(INSTALL_DIR) $(1)/usr/lib
181    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
182endef
183
184define Package/tune2fs/install
185    $(INSTALL_DIR) $(1)/usr/sbin
186    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
187endef
188
189define Package/resize2fs/install
190    $(INSTALL_DIR) $(1)/usr/sbin
191    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
192endef
193
194define Package/badblocks/install
195    $(INSTALL_DIR) $(1)/usr/sbin
196    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
197endef
198
199define Package/blkid/install
200    $(INSTALL_DIR) $(1)/usr/sbin
201    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
202endef
203
204$(eval $(call BuildPackage,e2fsprogs))
205$(eval $(call BuildPackage,libuuid))
206$(eval $(call BuildPackage,uuidgen))
207$(eval $(call BuildPackage,libblkid))
208$(eval $(call BuildPackage,libext2fs))
209$(eval $(call BuildPackage,tune2fs))
210$(eval $(call BuildPackage,resize2fs))
211$(eval $(call BuildPackage,badblocks))
212$(eval $(call BuildPackage,blkid))
213

Archive Download this file



interactive