replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / utils / 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.38
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
17 PKG_MD5SUM:=d774d4412bfb80d12cf3a4fdfd59de5a
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/e2fsprogs
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=Ext2/3 filesystem utilities
29 DESCRIPTION:=\
30 This package contains essential ext2 filesystem utilities which consists of \\\
31 e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2 \\\
32 filesystem utilities.
33 URL:=http://e2fsprogs.sourceforge.net/
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --enable-shared \
39 --enable-static \
40 --disable-rpath \
41 --enable-elf-shlibs \
42 --enable-dynamic-e2fsck \
43 )
44 endef
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR)/util \
48 BUILDCC="$(HOSTCC)" \
49 CFLAGS="" \
50 CPPFLAGS="" \
51 LDFLAGS="" \
52 subst
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 BUILDCC="$(HOSTCC)" \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 all install
57 endef
58
59 define Package/e2fsprogs/install
60 $(INSTALL_DIR) $(1)/usr/sbin
61 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
62 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
63 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.ext{2,3} $(1)/usr/sbin/
64 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
65 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{blkid,com_err,e2p,ext2fs,uuid}.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,e2fsprogs))