486ded72d5605a493c927467e83a1ff7a4016e66
[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_RELEASE:=1
12 PKG_VERSION:=4.11.0
13 PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs
14 PKG_HASH:=c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_INSTALL:=1
18 PKG_BUILD_PARALLEL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/xfsprogs/default
23 SECTION:=utils
24 CATEGORY:=Utilities
25 SUBMENU:=Filesystem
26 DEPENDS:=+libuuid +libpthread +librt
27 URL:=http://oss.sgi.com/projects/xfs
28 endef
29
30 define Package/xfs-mkfs
31 $(call Package/xfsprogs/default)
32 TITLE:=Utility for creating XFS filesystems
33 endef
34
35 define Package/xfs-fsck
36 $(call Package/xfsprogs/default)
37 TITLE:=Utilities for checking and repairing XFS filesystems
38 endef
39
40 define Package/xfs-growfs
41 $(call Package/xfsprogs/default)
42 TITLE:=Utility for increasing the size of XFS filesystems
43 endef
44
45 CONFIGURE_ARGS += \
46 --enable-gettext=no \
47 --enable-lib64=no \
48 --enable-blkid=no
49
50 TARGET_CFLAGS += \
51 -I$(STAGING_DIR)/usr/include \
52 -D_LARGEFILE64_SOURCE \
53 -D_FILE_OFFSET_BITS=64 \
54 -D_GNU_SOURCE
55
56 MAKE_FLAGS += \
57 DEBUG= Q= \
58 PCFLAGS="-Wall" \
59 PKG_PLATFORM=linux \
60 ENABLE_GETTEXT=no
61
62 define Build/Compile
63 $(MAKE) -C $(PKG_BUILD_DIR)/libxfs crc32table.h CFLAGS="$(HOST_CFLAGS) -I$(PKG_BUILD_DIR)/include"
64 $(call Build/Compile/Default)
65 endef
66
67 define Package/xfs-mkfs/install
68 mkdir -p $(1)/usr/sbin
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/usr/sbin
70 endef
71
72 define Package/xfs-fsck/install
73 mkdir -p $(1)/usr/sbin
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/usr/sbin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/usr/sbin
76 endef
77
78 define Package/xfs-growfs/install
79 mkdir -p $(1)/usr/sbin
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/usr/sbin
81 endef
82
83 $(eval $(call BuildPackage,xfs-mkfs))
84 $(eval $(call BuildPackage,xfs-fsck))
85 $(eval $(call BuildPackage,xfs-growfs))