16102907ae5500e5bacb77c5d598f0823323149d
[openwrt/svn-archive/archive.git] / package / e2fsprogs / Makefile
1 #
2 # Copyright (C) 2006 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.39
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
17 PKG_MD5SUM:=06f7806782e357797fad1d34b7ced0c6
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
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/libblkid
51 $(call Package/e2fsprogs/Default)
52 SECTION:=libs
53 CATEGORY:=Libraries
54 TITLE:=block device id library
55 endef
56
57 define Package/libblkid/description
58 The blkid library which allows system programs like fsck and mount to
59 quickly and easily find block devices by filesystem UUID and LABEL.
60 endef
61
62 define Package/tune2fs
63 $(call Package/e2fsprogs)
64 TITLE:=Ext2 Filesystem tune utility
65 DEPENDS:=e2fsprogs
66 endef
67
68 define Package/resize2fs
69 $(call Package/e2fsprogs)
70 TITLE:=Ext2 Filesystem resize utility
71 DEPENDS:=e2fsprogs
72 endef
73
74 CONFIGURE_ARGS += \
75 --enable-shared \
76 --enable-static \
77 --disable-rpath \
78 --enable-elf-shlibs \
79 --enable-dynamic-e2fsck
80
81 define Build/Prepare
82 $(call Build/Prepare/Default)
83 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
84 endef
85
86 define Build/Compile
87 $(MAKE) -C $(PKG_BUILD_DIR)/util \
88 BUILDCC="$(HOSTCC)" \
89 CFLAGS="" \
90 CPPFLAGS="" \
91 LDFLAGS="" \
92 subst
93 $(MAKE) -C $(PKG_BUILD_DIR) \
94 BUILDCC="$(HOSTCC)" \
95 DESTDIR="$(PKG_INSTALL_DIR)" \
96 all install
97 endef
98
99 define Build/InstallDev
100 $(MAKE) -C $(PKG_BUILD_DIR) \
101 BUILDCC="$(HOSTCC)" \
102 DESTDIR="$(1)" \
103 install-libs
104 $(SED) 's,-I$$$${includedir},,g' $(1)/usr/lib/pkgconfig/{blkid,com_err,e2p,ext2fs,ss,uuid}.pc
105 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/{blkid,com_err,e2p,ext2fs,ss,uuid}.pc
106 endef
107
108 define Build/UninstallDev
109 -$(MAKE) -C $(PKG_BUILD_DIR) \
110 BUILDCC="$(HOSTCC)" \
111 DESTDIR="$(STAGING_DIR)" \
112 uninstall-libs
113 endef
114
115 define Package/e2fsprogs/install
116 $(INSTALL_DIR) $(1)/usr/sbin
117 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
118 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
119 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
120 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
121 $(INSTALL_DIR) $(1)/usr/lib
122 $(CP) $(foreach lib,com_err e2p ext2fs,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
123 endef
124
125 define Package/libuuid/install
126 $(INSTALL_DIR) $(1)/usr/lib
127 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
128 endef
129
130 define Package/libblkid/install
131 $(INSTALL_DIR) $(1)/usr/lib
132 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
133 endef
134
135 define Package/tune2fs/install
136 $(INSTALL_DIR) $(1)/usr/sbin
137 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
138 endef
139
140 define Package/resize2fs/install
141 $(INSTALL_DIR) $(1)/usr/sbin
142 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
143 endef
144
145 $(eval $(call BuildPackage,e2fsprogs))
146 $(eval $(call BuildPackage,libuuid))
147 $(eval $(call BuildPackage,libblkid))
148 $(eval $(call BuildPackage,tune2fs))
149 $(eval $(call BuildPackage,resize2fs))