5cf1da240f260afec5ee9d27452c180a2d9d3fa6
[openwrt/openwrt.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_CPE_ID:=cpe:/a:sgi:xfsprogs
12 PKG_RELEASE:=1
13 PKG_VERSION:=4.11.0
14 PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs
15 PKG_HASH:=c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
18 PKG_INSTALL:=1
19 PKG_BUILD_PARALLEL:=1
20
21 include $(INCLUDE_DIR)/package.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
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR)/libxfs crc32table.h CFLAGS="$(HOST_CFLAGS) -I$(PKG_BUILD_DIR)/include"
65 $(call Build/Compile/Default)
66 endef
67
68 define Package/xfs-mkfs/install
69 mkdir -p $(1)/usr/sbin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/usr/sbin
71 endef
72
73 define Package/xfs-fsck/install
74 mkdir -p $(1)/usr/sbin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/usr/sbin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/usr/sbin
77 endef
78
79 define Package/xfs-growfs/install
80 mkdir -p $(1)/usr/sbin
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/usr/sbin
82 endef
83
84 $(eval $(call BuildPackage,xfs-mkfs))
85 $(eval $(call BuildPackage,xfs-fsck))
86 $(eval $(call BuildPackage,xfs-growfs))