1238daf97216a1bb6c16d7662f5a34c86e53d54b
[packages.git] / utils / btrfs-progs / Makefile
1 #
2 # Copyright (C) 2009 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:=btrfs-progs
11 PKG_VERSION:=0.18
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/
16 PKG_MD5SUM:=1dfe59152a558eb2f79a4c398de6c4ef
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/btrfs-progs
21   SECTION:=utils
22   CATEGORY:=Utilities
23   DEPENDS:=+libuuid
24   TITLE:=Btrfs filesystems utilities
25   URL:=http://btrfs.wiki.kernel.org/
26 endef
27
28 define Package/btrfs-progs/description
29  Btrfs is a new copy on write filesystem for Linux aimed at implementing
30  advanced features while focusing on fault tolerance, repair and easy
31  administration. Initially developed by Oracle, Btrfs is licensed under the
32  GPL and open for contribution from anyone. 
33 endef
34
35 progs = btrfsctl btrfsck mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol \
36         btrfstune btrfs-image
37
38 define Build/Compile
39         $(MAKE) -C $(PKG_BUILD_DIR) \
40                 CC=$(TARGET_CC) \
41                 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
42                 LDFLAGS="$(TARGET_LDFLAGS)" \
43                 prefix=/usr \
44                 DESTDIR=$(PKG_INSTALL_DIR) \
45                 all install
46 endef
47
48 define Package/btrfs-progs/install
49         $(INSTALL_DIR) $(1)/usr/bin
50         $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
51 endef
52
53 $(eval $(call BuildPackage,btrfs-progs))