add file type autodetection for the unpack command and nuke PKG_CAT:= in lots of...
[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
22 SECTION:=utils
23 CATEGORY:=Utilities
24 TITLE:=Ext2/3 filesystem utilities
25 DESCRIPTION:=\
26 This package contains essential ext2 filesystem utilities which consists of \\\
27 e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2 \\\
28 filesystem utilities.
29 URL:=http://e2fsprogs.sourceforge.net/
30 endef
31
32 define Package/tune2fs
33 $(call Package/e2fsprogs)
34 TITLE:=Ext2 Filesystem tune utility
35 DESCRIPTION:=Ext2 Filesystem tune utility
36 DEPENDS:=e2fsprogs
37 endef
38
39 define Package/resize2fs
40 $(call Package/e2fsprogs)
41 TITLE:=Ext2 Filesystem resize utility
42 DESCRIPTION:=Ext2 Filesystem resize utility
43 DEPENDS:=e2fsprogs
44 endef
45
46 CONFIGURE_ARGS += \
47 --enable-shared \
48 --enable-static \
49 --disable-rpath \
50 --enable-elf-shlibs \
51 --enable-dynamic-e2fsck
52
53 define Build/Compile
54 $(MAKE) -C $(PKG_BUILD_DIR)/util \
55 BUILDCC="$(HOSTCC)" \
56 CFLAGS="" \
57 CPPFLAGS="" \
58 LDFLAGS="" \
59 subst
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 BUILDCC="$(HOSTCC)" \
62 DESTDIR="$(PKG_INSTALL_DIR)" \
63 all install
64 endef
65
66 define Package/e2fsprogs/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
69 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
70 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
71 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{blkid,com_err,e2p,ext2fs,uuid}.so.* $(1)/usr/lib/
74 endef
75
76 define Package/tune2fs/install
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
79 endef
80
81 define Package/resize2fs/install
82 $(INSTALL_DIR) $(1)/usr/sbin
83 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
84 endef
85
86 $(eval $(call BuildPackage,e2fsprogs))
87 $(eval $(call BuildPackage,tune2fs))
88 $(eval $(call BuildPackage,resize2fs))