[package] package blkid out of e2fsprogs (#4720)
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=e2fsprogs
12 PKG_VERSION:=1.40.11
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
17 PKG_MD5SUM:=004cea70d724fdc7f1a952dffe4c9db8
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/e2fsprogs/Default
22 URL:=http://e2fsprogs.sourceforge.net/
23 endef
24
25 define Package/e2fsprogs
26 $(call Package/e2fsprogs/Default)
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=Ext2/3 filesystem utilities
30 DEPENDS:=+libblkid +libuuid +libext2fs
31 endef
32
33 define 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.
37 endef
38
39 define Package/libuuid
40 $(call Package/e2fsprogs/Default)
41 SECTION:=libs
42 CATEGORY:=Libraries
43 TITLE:=DCE compatible Universally Unique Identifier library
44 endef
45
46 define Package/libuuid/description
47 Library for generating DCE compatible Universally Unique Identifiers.
48 endef
49
50 define Package/uuidgen
51 $(call Package/e2fsprogs)
52 DEPENDS:=libuuid
53 TITLE:=Command line utility to create a new UUID value
54 endef
55
56 define 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.
61 endef
62
63 define Package/libblkid
64 $(call Package/e2fsprogs/Default)
65 SECTION:=libs
66 CATEGORY:=Libraries
67 TITLE:=block device id library
68 endef
69
70 define 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.
73 endef
74
75 define Package/libext2fs
76 $(call Package/e2fsprogs/Default)
77 SECTION:=libs
78 CATEGORY:=Libraries
79 TITLE:=ext2/ext3 filesystem library
80 endef
81
82 define Package/libext2fs/description
83 libext2fs is a library which can access ext2 and ext3 filesystems.
84 endef
85
86 define Package/tune2fs
87 $(call Package/e2fsprogs)
88 TITLE:=Ext2 Filesystem tune utility
89 DEPENDS:=e2fsprogs
90 endef
91
92 define Package/resize2fs
93 $(call Package/e2fsprogs)
94 TITLE:=Ext2 Filesystem resize utility
95 DEPENDS:=e2fsprogs
96 endef
97
98 define Package/badblocks
99 $(call Package/e2fsprogs)
100 TITLE:=Ext2 Filesystem badblocks utility
101 DEPENDS:=e2fsprogs
102 endef
103
104 define Package/blkid
105 $(call Package/e2fsprogs)
106 TITLE:=Command-line utility to locate/print block device attributes
107 DEPENDS:=e2fsprogs
108 endef
109
110 CONFIGURE_ARGS += \
111 --enable-shared \
112 --enable-static \
113 --disable-rpath \
114 --enable-elf-shlibs \
115 --enable-dynamic-e2fsck \
116 --disable-tls
117
118 define Build/Prepare
119 $(call Build/Prepare/Default)
120 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
121 endef
122
123 define Build/Compile
124 $(MAKE) -C $(PKG_BUILD_DIR)/util \
125 BUILDCC="$(HOSTCC)" \
126 CFLAGS="" \
127 CPPFLAGS="" \
128 LDFLAGS="" \
129 subst
130 $(MAKE) -C $(PKG_BUILD_DIR) \
131 BUILDCC="$(HOSTCC)" \
132 DESTDIR="$(PKG_INSTALL_DIR)" \
133 all install
134 endef
135
136 define Build/InstallDev
137 $(MAKE) -C $(PKG_BUILD_DIR) \
138 BUILDCC="$(HOSTCC)" \
139 DESTDIR="$(1)" \
140 install-libs
141 $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
142 BUILDCC="$(HOSTCC)" \
143 DESTDIR="$(1)" \
144 install
145 endef
146
147 define Package/e2fsprogs/install
148 $(INSTALL_DIR) $(1)/usr/sbin
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
151 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
152 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
153 $(INSTALL_DIR) $(1)/usr/lib
154 $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
155 $(INSTALL_DIR) $(1)/etc/init.d
156 $(INSTALL_BIN) ./files/e2fsck.init $(1)/etc/init.d/e2fsck
157
158 endef
159
160 define Package/libuuid/install
161 $(INSTALL_DIR) $(1)/usr/lib
162 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
163 endef
164
165 define Package/uuidgen/install
166 $(INSTALL_DIR) $(1)/usr/bin
167 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
168 endef
169
170 define Package/libblkid/install
171 $(INSTALL_DIR) $(1)/usr/lib
172 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
173 endef
174
175 define Package/libext2fs/install
176 $(INSTALL_DIR) $(1)/usr/lib
177 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so* $(1)/usr/lib/
178 endef
179
180 define Package/tune2fs/install
181 $(INSTALL_DIR) $(1)/usr/sbin
182 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
183 endef
184
185 define Package/resize2fs/install
186 $(INSTALL_DIR) $(1)/usr/sbin
187 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
188 endef
189
190 define Package/badblocks/install
191 $(INSTALL_DIR) $(1)/usr/sbin
192 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
193 endef
194
195 define Package/blkid/install
196 $(INSTALL_DIR) $(1)/usr/sbin
197 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
198 endef
199
200 $(eval $(call BuildPackage,e2fsprogs))
201 $(eval $(call BuildPackage,libuuid))
202 $(eval $(call BuildPackage,uuidgen))
203 $(eval $(call BuildPackage,libblkid))
204 $(eval $(call BuildPackage,libext2fs))
205 $(eval $(call BuildPackage,tune2fs))
206 $(eval $(call BuildPackage,resize2fs))
207 $(eval $(call BuildPackage,badblocks))
208 $(eval $(call BuildPackage,blkid))
This page took 0.055071 seconds and 5 git commands to generate.