Root/package/e2fsprogs/Makefile

1#
2# Copyright (C) 2006-2010 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.12
12PKG_MD5SUM:=1b24a21fc0c2381ef420961cbfec733f
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
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/tune2fs
89$(call Package/e2fsprogs)
90  TITLE:=Ext2 Filesystem tune utility
91  DEPENDS:= +e2fsprogs
92endef
93
94define Package/resize2fs
95$(call Package/e2fsprogs)
96  TITLE:=Ext2 Filesystem resize utility
97  DEPENDS:= +e2fsprogs
98endef
99
100define Package/badblocks
101$(call Package/e2fsprogs)
102  TITLE:=Ext2 Filesystem badblocks utility
103  DEPENDS:= +e2fsprogs
104endef
105
106define Package/blkid
107$(call Package/e2fsprogs)
108  TITLE:=Command-line utility to locate/print block device attributes
109  DEPENDS:=+libuuid +libblkid
110endef
111
112TARGET_CFLAGS += $(FPIC)
113
114CONFIGURE_ARGS += \
115    --enable-shared \
116    --enable-static \
117    --disable-rpath \
118    --enable-elf-shlibs \
119    --enable-dynamic-e2fsck \
120    --disable-tls
121
122define Build/Prepare
123    $(call Build/Prepare/Default)
124    $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
125endef
126
127define Build/Compile
128    $(MAKE) -C $(PKG_BUILD_DIR)/util \
129        BUILDCC="$(HOSTCC)" \
130        CFLAGS="" \
131        CPPFLAGS="" \
132        LDFLAGS="" \
133        subst
134    $(MAKE) -C $(PKG_BUILD_DIR) \
135        BUILDCC="$(HOSTCC)" \
136        DESTDIR="$(PKG_INSTALL_DIR)" \
137        all
138endef
139
140define Build/InstallDev
141    $(MAKE) -C $(PKG_BUILD_DIR) \
142        BUILDCC="$(HOSTCC)" \
143        DESTDIR="$(1)" \
144        install-libs
145    $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
146        BUILDCC="$(HOSTCC)" \
147        DESTDIR="$(1)" \
148        install
149endef
150
151define Package/e2fsprogs/install
152    $(INSTALL_DIR) $(1)/usr/sbin
153    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
154    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
155    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
156    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
157    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
158    $(INSTALL_DIR) $(1)/usr/lib
159    $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
160    $(INSTALL_DIR) $(1)/etc/init.d
161    $(INSTALL_DIR) $(1)/lib/functions/fsck
162    $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
163    $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
164endef
165
166define Package/libuuid/install
167    $(INSTALL_DIR) $(1)/usr/lib
168    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
169endef
170
171define Package/uuidgen/install
172    $(INSTALL_DIR) $(1)/usr/bin
173    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
174endef
175
176define Package/libblkid/install
177    $(INSTALL_DIR) $(1)/usr/lib
178    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
179endef
180
181define Package/libext2fs/install
182    $(INSTALL_DIR) $(1)/usr/lib
183    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
184endef
185
186define Package/tune2fs/install
187    $(INSTALL_DIR) $(1)/usr/sbin
188    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
189endef
190
191define Package/resize2fs/install
192    $(INSTALL_DIR) $(1)/usr/sbin
193    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
194endef
195
196define Package/badblocks/install
197    $(INSTALL_DIR) $(1)/usr/sbin
198    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
199endef
200
201define Package/blkid/install
202    $(INSTALL_DIR) $(1)/usr/sbin
203    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
204endef
205
206$(eval $(call BuildPackage,e2fsprogs))
207$(eval $(call BuildPackage,libuuid))
208$(eval $(call BuildPackage,uuidgen))
209$(eval $(call BuildPackage,libblkid))
210$(eval $(call BuildPackage,libext2fs))
211$(eval $(call BuildPackage,tune2fs))
212$(eval $(call BuildPackage,resize2fs))
213$(eval $(call BuildPackage,badblocks))
214$(eval $(call BuildPackage,blkid))
215

Archive Download this file



interactive