ar71xx: fix splitting firmware partition for TL-WR902AC v1
[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:=4
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-admin
32 $(call Package/xfsprogs/default)
33 TITLE:=Utilities for changing parameters of an XFS filesystems
34 endef
35
36 define Package/xfs-mkfs
37 $(call Package/xfsprogs/default)
38 TITLE:=Utility for creating XFS filesystems
39 endef
40
41 define Package/xfs-fsck
42 $(call Package/xfsprogs/default)
43 TITLE:=Utilities for checking and repairing XFS filesystems
44 endef
45
46 define Package/xfs-growfs
47 $(call Package/xfsprogs/default)
48 TITLE:=Utility for increasing the size of XFS filesystems
49 endef
50
51 CONFIGURE_ARGS += \
52 --enable-gettext=no \
53 --enable-lib64=no \
54 --enable-blkid=no
55
56 TARGET_CFLAGS += \
57 -I$(STAGING_DIR)/usr/include \
58 -D_LARGEFILE64_SOURCE \
59 -D_FILE_OFFSET_BITS=64 \
60 -D_GNU_SOURCE
61
62 MAKE_FLAGS += \
63 DEBUG= Q= \
64 PCFLAGS="-Wall" \
65 PKG_PLATFORM=linux \
66 ENABLE_GETTEXT=no
67
68 define Build/Compile
69 $(MAKE) -C $(PKG_BUILD_DIR)/libxfs crc32table.h CFLAGS="$(HOST_CFLAGS) -I$(PKG_BUILD_DIR)/include"
70 $(call Build/Compile/Default)
71 endef
72
73 define Package/xfs-admin/install
74 mkdir -p $(1)/sbin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/sbin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_admin $(1)/sbin
77 endef
78
79 define Package/xfs-mkfs/install
80 mkdir -p $(1)/usr/sbin
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/usr/sbin
82 endef
83
84 define Package/xfs-fsck/install
85 mkdir -p $(1)/usr/sbin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/usr/sbin
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/usr/sbin
88 endef
89
90 define Package/xfs-growfs/install
91 mkdir -p $(1)/usr/sbin
92 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/usr/sbin
93 endef
94
95 $(eval $(call BuildPackage,xfs-admin))
96 $(eval $(call BuildPackage,xfs-mkfs))
97 $(eval $(call BuildPackage,xfs-fsck))
98 $(eval $(call BuildPackage,xfs-growfs))