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

Archive Download this file



interactive