move package description to a separate definition, remove it when DESCRIPTION=TITLE
[openwrt-10.03/.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   DESCRIPTION:=\
32         This package contains essential ext2 filesystem utilities which consists of \\\
33         e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2 \\\
34         filesystem utilities.
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/libblkid
55 $(call Package/e2fsprogs/Default)
56   SECTION:=libs
57   CATEGORY:=Libraries
58   TITLE:=block device id library
59 endef
60
61 define Package/libblkid/description
62  The blkid library which allows system programs like fsck and mount to 
63  quickly and easily find block devices by filesystem UUID and LABEL.
64 endef
65
66 define Package/tune2fs
67 $(call Package/e2fsprogs)
68   TITLE:=Ext2 Filesystem tune utility
69   DEPENDS:=e2fsprogs
70 endef
71
72 define Package/resize2fs
73 $(call Package/e2fsprogs)
74   TITLE:=Ext2 Filesystem resize utility
75   DEPENDS:=e2fsprogs
76 endef
77
78 CONFIGURE_ARGS += \
79         --enable-shared \
80         --enable-static \
81         --disable-rpath \
82         --enable-elf-shlibs \
83         --enable-dynamic-e2fsck
84
85 define Build/Prepare
86         $(call Build/Prepare/Default)
87         $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
88 endef
89
90 define Build/Compile
91         $(MAKE) -C $(PKG_BUILD_DIR)/util \
92                 BUILDCC="$(HOSTCC)" \
93                 CFLAGS="" \
94                 CPPFLAGS="" \
95                 LDFLAGS="" \
96                 subst
97         $(MAKE) -C $(PKG_BUILD_DIR) \
98                 BUILDCC="$(HOSTCC)" \
99                 DESTDIR="$(PKG_INSTALL_DIR)" \
100                 all install
101 endef
102
103 define Build/InstallDev
104         $(MAKE) -C $(PKG_BUILD_DIR) \
105                 BUILDCC="$(HOSTCC)" \
106                 DESTDIR="$(STAGING_DIR)" \
107                 install-libs
108         $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/{blkid,com_err,e2p,ext2fs,ss,uuid}.pc
109         $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/{blkid,com_err,e2p,ext2fs,ss,uuid}.pc
110 endef
111
112 define Build/UninstallDev
113         -$(MAKE) -C $(PKG_BUILD_DIR) \
114                 BUILDCC="$(HOSTCC)" \
115                 DESTDIR="$(STAGING_DIR)" \
116                 uninstall-libs
117 endef
118
119 define Package/e2fsprogs/install
120         $(INSTALL_DIR) $(1)/usr/sbin
121         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
122         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
123         ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
124         ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
125         $(INSTALL_DIR) $(1)/usr/lib
126         $(CP) $(foreach lib,com_err e2p ext2fs,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
127 endef
128
129 define Package/libuuid/install
130         $(INSTALL_DIR) $(1)/usr/lib
131         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
132 endef
133
134 define Package/libblkid/install
135         $(INSTALL_DIR) $(1)/usr/lib
136         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
137 endef
138
139 define Package/tune2fs/install
140         $(INSTALL_DIR) $(1)/usr/sbin
141         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
142 endef
143
144 define Package/resize2fs/install
145         $(INSTALL_DIR) $(1)/usr/sbin
146         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
147 endef
148
149 $(eval $(call BuildPackage,e2fsprogs))
150 $(eval $(call BuildPackage,libuuid))
151 $(eval $(call BuildPackage,libblkid))
152 $(eval $(call BuildPackage,tune2fs))
153 $(eval $(call BuildPackage,resize2fs))