port e2fsprogs to buildroot-ng
[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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/e2fsprogs
18 PKG_MD5SUM:=d774d4412bfb80d12cf3a4fdfd59de5a
19 PKG_CAT:=zcat
20
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:=Ext2/3 filesystem utilities.\\\
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 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
41 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
42 ./configure \
43 --target=$(GNU_TARGET_NAME) \
44 --host=$(GNU_TARGET_NAME) \
45 --build=$(GNU_HOST_NAME) \
46 --program-prefix="" \
47 --program-suffix="" \
48 --prefix=/usr \
49 --exec-prefix=/usr \
50 --bindir=/usr/bin \
51 --datadir=/usr/share \
52 --includedir=/usr/include \
53 --infodir=/usr/share/info \
54 --libdir=/usr/lib \
55 --libexecdir=/usr/lib \
56 --localstatedir=/var \
57 --mandir=/usr/share/man \
58 --sbindir=/sbin \
59 --sysconfdir=/etc \
60 $(DISABLE_LARGEFILE) \
61 $(DISABLE_NLS) \
62 --enable-shared \
63 --enable-static \
64 --disable-rpath \
65 --with-gnu-ld \
66 --enable-elf-shlibs \
67 --enable-dynamic-e2fsck \
68 );
69 endef
70
71 define Build/Compile
72 rm -rf $(PKG_INSTALL_DIR)
73 mkdir -p $(PKG_INSTALL_DIR)
74 $(MAKE) -C $(PKG_BUILD_DIR)/util \
75 BUILDCC="$(HOSTCC)" \
76 CFLAGS="" \
77 subst
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 BUILDCC="$(HOSTCC)" \
80 DESTDIR="$(PKG_INSTALL_DIR)" \
81 all install
82 endef
83
84 define Package/e2fsprogs/install
85 install -d -m0755 $(1)/sbin
86 $(CP) $(PKG_INSTALL_DIR)/sbin/e2fsck $(1)/sbin/
87 $(CP) $(PKG_INSTALL_DIR)/sbin/mke2fs $(1)/sbin/
88 $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.ext{2,3} $(1)/sbin/
89 $(CP) $(PKG_INSTALL_DIR)/sbin/tune2fs $(1)/sbin/
90 install -d -m0755 $(1)/usr/lib
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{blkid,com_err,e2p,ext2fs,uuid}.so.* $(1)/usr/lib/
92 endef
93
94 $(eval $(call BuildPackage,e2fsprogs))