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.4
12PKG_MD5SUM:=b6e296f210d642361b7394437ff0f318
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=@SF/e2fsprogs
17
18PKG_BUILD_DEPENDS:=util-linux
19PKG_INSTALL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/e2fsprogs/Default
24  URL:=http://e2fsprogs.sourceforge.net/
25  SUBMENU:=Filesystem
26endef
27
28define Package/e2fsprogs
29$(call Package/e2fsprogs/Default)
30  SECTION:=utils
31  CATEGORY:=Utilities
32  TITLE:=Ext2/3/4 filesystem utilities
33  DEPENDS:=+libblkid +libuuid +libext2fs
34endef
35
36define 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
39 filesystem utilities.
40endef
41
42define Package/libext2fs
43$(call Package/e2fsprogs/Default)
44  DEPENDS:=+libcom_err
45  SECTION:=libs
46  CATEGORY:=Libraries
47  TITLE:=ext2/3/4 filesystem library
48endef
49
50define Package/libext2fs/description
51 libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
52endef
53
54define Package/libcom_err
55$(call Package/e2fsprogs/Default)
56  DEPENDS:=+libpthread
57  SECTION:=libs
58  CATEGORY:=Libraries
59  TITLE:=Common error description library
60endef
61
62define Package/libcom_err/description
63 libcom_err is a library providing common error descriptions
64endef
65
66define Package/tune2fs
67$(call Package/e2fsprogs)
68  TITLE:=Ext2 Filesystem tune utility
69  DEPENDS:= +e2fsprogs
70endef
71
72define Package/resize2fs
73$(call Package/e2fsprogs)
74  TITLE:=Ext2 Filesystem resize utility
75  DEPENDS:= +e2fsprogs
76endef
77
78define Package/badblocks
79$(call Package/e2fsprogs)
80  TITLE:=Ext2 Filesystem badblocks utility
81  DEPENDS:= +e2fsprogs
82endef
83
84TARGET_CFLAGS += $(FPIC)
85
86CONFIGURE_ARGS += \
87    --enable-elf-shlibs \
88    --disable-libuuid \
89    --disable-libblkid \
90    --disable-uuidd \
91    --disable-tls \
92    --disable-nls \
93    --disable-rpath
94
95define Build/Prepare
96    $(call Build/Prepare/Default)
97    $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
98endef
99
100define Build/Compile
101    $(MAKE) -C $(PKG_BUILD_DIR)/util \
102        BUILDCC="$(HOSTCC)" \
103        CFLAGS="" \
104        CPPFLAGS="" \
105        LDFLAGS="" \
106        subst
107    $(MAKE) -C $(PKG_BUILD_DIR) \
108        BUILDCC="$(HOSTCC)" \
109        DESTDIR="$(PKG_INSTALL_DIR)" \
110        all
111endef
112
113define Build/InstallDev
114    $(MAKE) -C $(PKG_BUILD_DIR) \
115        BUILDCC="$(HOSTCC)" \
116        DESTDIR="$(1)" \
117        install-libs
118    $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
119        BUILDCC="$(HOSTCC)" \
120        DESTDIR="$(1)" \
121        install
122endef
123
124define Package/e2fsprogs/install
125    $(INSTALL_DIR) $(1)/usr/sbin
126    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
127    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
128    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
129    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
130    ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
131    $(INSTALL_DIR) $(1)/usr/lib
132    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
133    $(INSTALL_DIR) $(1)/etc/init.d
134    $(INSTALL_DIR) $(1)/lib/functions/fsck
135    $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
136    $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
137endef
138
139define Package/libcom_err/install
140    $(INSTALL_DIR) $(1)/usr/lib
141    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* $(1)/usr/lib/
142endef
143
144define Package/libext2fs/install
145    $(INSTALL_DIR) $(1)/usr/lib
146    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
147endef
148
149define Package/tune2fs/install
150    $(INSTALL_DIR) $(1)/usr/sbin
151    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
152endef
153
154define Package/resize2fs/install
155    $(INSTALL_DIR) $(1)/usr/sbin
156    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
157endef
158
159define Package/badblocks/install
160    $(INSTALL_DIR) $(1)/usr/sbin
161    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
162endef
163
164$(eval $(call BuildPackage,e2fsprogs))
165$(eval $(call BuildPackage,libext2fs))
166$(eval $(call BuildPackage,libcom_err))
167$(eval $(call BuildPackage,tune2fs))
168$(eval $(call BuildPackage,resize2fs))
169$(eval $(call BuildPackage,badblocks))
170

Archive Download this file



interactive