[tools] firmware-utils/mkcsysimg: minor bugfix
[openwrt.git] / package / e2fsprogs / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=e2fsprogs
11 ifneq ($(findstring "0.9.29",$(CONFIG_UCLIBC_VERSION)),"0.9.29")
12 PKG_VERSION:=1.41.5
13 PKG_MD5SUM:=e218df6c84fc17c1126d31de9472a76c
14 else
15 PKG_VERSION:=1.40.11
16 PKG_MD5SUM:=004cea70d724fdc7f1a952dffe4c9db8
17 endif
18 PKG_RELEASE:=1
19
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
21 PKG_SOURCE_URL:=@SF/e2fsprogs
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/e2fsprogs/Default
26 URL:=http://e2fsprogs.sourceforge.net/
27 endef
28
29 define Package/e2fsprogs
30 $(call Package/e2fsprogs/Default)
31 SECTION:=utils
32 CATEGORY:=Utilities
33 TITLE:=Ext2/3 filesystem utilities
34 DEPENDS:=+libblkid +libuuid +libext2fs +libpthread
35 endef
36
37 define Package/e2fsprogs/description
38 This package contains essential ext2 filesystem utilities which consists of
39 e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2
40 filesystem utilities.
41 endef
42
43 define Package/libuuid
44 $(call Package/e2fsprogs/Default)
45 SECTION:=libs
46 CATEGORY:=Libraries
47 TITLE:=DCE compatible Universally Unique Identifier library
48 endef
49
50 define Package/libuuid/description
51 Library for generating DCE compatible Universally Unique Identifiers.
52 endef
53
54 define Package/uuidgen
55 $(call Package/e2fsprogs)
56 DEPENDS:=libuuid
57 TITLE:=Command line utility to create a new UUID value
58 endef
59
60 define Package/uuidgen/description
61 uuidgen program creates a new universally unique identifier (UUID)
62 using the libuuid library. The new UUID can reasonably be considered
63 unique among all UUIDs created on the local system, and among UUIDs
64 created on other systems in the past and in the future.
65 endef
66
67 define Package/libblkid
68 $(call Package/e2fsprogs/Default)
69 SECTION:=libs
70 CATEGORY:=Libraries
71 TITLE:=block device id library
72 endef
73
74 define Package/libblkid/description
75 The blkid library which allows system programs like fsck and mount to
76 quickly and easily find block devices by filesystem UUID and LABEL.
77 endef
78
79 define Package/libext2fs
80 $(call Package/e2fsprogs/Default)
81 SECTION:=libs
82 CATEGORY:=Libraries
83 TITLE:=ext2/ext3 filesystem library
84 endef
85
86 define Package/libext2fs/description
87 libext2fs is a library which can access ext2 and ext3 filesystems.
88 endef
89
90 define Package/tune2fs
91 $(call Package/e2fsprogs)
92 TITLE:=Ext2 Filesystem tune utility
93 DEPENDS:=e2fsprogs
94 endef
95
96 define Package/resize2fs
97 $(call Package/e2fsprogs)
98 TITLE:=Ext2 Filesystem resize utility
99 DEPENDS:=e2fsprogs
100 endef
101
102 define Package/badblocks
103 $(call Package/e2fsprogs)
104 TITLE:=Ext2 Filesystem badblocks utility
105 DEPENDS:=e2fsprogs
106 endef
107
108 define Package/blkid
109 $(call Package/e2fsprogs)
110 TITLE:=Command-line utility to locate/print block device attributes
111 DEPENDS:=libuuid libblkid
112 endef
113
114 CONFIGURE_ARGS += \
115 --enable-shared \
116 --enable-static \
117 --disable-rpath \
118 --enable-elf-shlibs \
119 --enable-dynamic-e2fsck \
120 --disable-tls
121
122 define Build/Prepare
123 $(call Build/Prepare/Default)
124 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
125 endef
126
127 define 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 install
138 endef
139
140 define 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
149 endef
150
151 define 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 $(INSTALL_DIR) $(1)/usr/lib
158 $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
159 $(INSTALL_DIR) $(1)/etc/init.d
160 $(INSTALL_BIN) ./files/e2fsck.init $(1)/etc/init.d/e2fsck
161
162 endef
163
164 define Package/libuuid/install
165 $(INSTALL_DIR) $(1)/usr/lib
166 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
167 endef
168
169 define Package/uuidgen/install
170 $(INSTALL_DIR) $(1)/usr/bin
171 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
172 endef
173
174 define Package/libblkid/install
175 $(INSTALL_DIR) $(1)/usr/lib
176 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
177 endef
178
179 define Package/libext2fs/install
180 $(INSTALL_DIR) $(1)/usr/lib
181 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so* $(1)/usr/lib/
182 endef
183
184 define Package/tune2fs/install
185 $(INSTALL_DIR) $(1)/usr/sbin
186 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
187 endef
188
189 define Package/resize2fs/install
190 $(INSTALL_DIR) $(1)/usr/sbin
191 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
192 endef
193
194 define Package/badblocks/install
195 $(INSTALL_DIR) $(1)/usr/sbin
196 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
197 endef
198
199 define Package/blkid/install
200 $(INSTALL_DIR) $(1)/usr/sbin
201 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
202 endef
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))
This page took 0.066803 seconds and 5 git commands to generate.