cd9d5f9d385491d632bccd5623c7a348f3716b91
[openwrt/staging/mkresin.git] / package / utils / xfsprogs / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=xfsprogs
11 PKG_RELEASE:=1
12 PKG_VERSION:=3.1.7
13 PKG_SOURCE_URL:=ftp://oss.sgi.com/projects/xfs/previous/
14 PKG_MD5SUM:=049cf9873794ea49d0bb3f12d45748a4
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_INSTALL:=1
18 PKG_FIXUP:=autoreconf
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/nls.mk
22
23 define Package/xfsprogs/default
24 SECTION:=utils
25 CATEGORY:=Utilities
26 SUBMENU:=Filesystem
27 DEPENDS:=+libuuid +libpthread +librt
28 URL:=http://oss.sgi.com/projects/xfs
29 endef
30
31 define Package/xfs-mkfs
32 $(call Package/xfsprogs/default)
33 TITLE:=Utility for creating XFS filesystems
34 endef
35
36 define Package/xfs-fsck
37 $(call Package/xfsprogs/default)
38 TITLE:=Utilities for checking and repairing XFS filesystems
39 endef
40
41 define Package/xfs-growfs
42 $(call Package/xfsprogs/default)
43 TITLE:=Utility for increasing the size of XFS filesystems
44 endef
45
46 CONFIGURE_ARGS += \
47 --enable-gettext=no \
48 --enable-lib64=no \
49 --enable-blkid=no
50
51 TARGET_CFLAGS += \
52 -I$(STAGING_DIR)/usr/include \
53 -D_LARGEFILE64_SOURCE \
54 -D_FILE_OFFSET_BITS=64 \
55 -D_GNU_SOURCE
56
57 MAKE_FLAGS += \
58 DEBUG= Q= \
59 PCFLAGS="-Wall" \
60 PKG_PLATFORM=linux \
61 ENABLE_GETTEXT=no \
62 prefix=$(PKG_INSTALL_DIR)/usr \
63 exec_prefix=$(PKG_INSTALL_DIR)/usr \
64 PKG_SBIN_DIR=$(PKG_INSTALL_DIR)/usr/sbin \
65 PKG_ROOT_SBIN_DIR=$(PKG_INSTALL_DIR)/sbin \
66 PKG_MAN_DIR=$(PKG_INSTALL_DIR)/usr/man \
67 PKG_LOCALE_DIR=$(PKG_INSTALL_DIR)/usr/share/locale \
68 PKG_ROOT_LIB_DIR=$(PKG_INSTALL_DIR)/lib \
69 PKG_DOC_DIR=$(PKG_INSTALL_DIR)/usr/share/doc/xfsprogs
70
71 define Package/xfs-mkfs/install
72 mkdir -p $(1)/usr/sbin
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/usr/sbin
74 endef
75
76 define Package/xfs-fsck/install
77 mkdir -p $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/usr/sbin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/usr/sbin
80 endef
81
82 define Package/xfs-growfs/install
83 mkdir -p $(1)/usr/sbin
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/usr/sbin
85 endef
86
87 $(eval $(call BuildPackage,xfs-mkfs))
88 $(eval $(call BuildPackage,xfs-fsck))
89 $(eval $(call BuildPackage,xfs-growfs))