btrfs-progs: import from oldpackges
authorDaniel Golle <redacted>
Fri, 5 Dec 2014 16:11:04 +0000 (17:11 +0100)
committerDaniel Golle <redacted>
Fri, 5 Dec 2014 17:57:45 +0000 (18:57 +0100)
bump to 3.17.3, add LICENSE and MAINTAINER info, bump license header,
add missing dependencies, ...

Signed-off-by: Daniel Golle <redacted>
utils/btrfs-progs/Makefile [new file with mode: 0644]
utils/btrfs-progs/files/btrfs-scan.init [new file with mode: 0644]
utils/btrfs-progs/patches/001-fix-xattr-h-include-location.patch [new file with mode: 0644]

diff --git a/utils/btrfs-progs/Makefile b/utils/btrfs-progs/Makefile
new file mode 100644 (file)
index 0000000..ca7bbc0
--- /dev/null
@@ -0,0 +1,67 @@
+#
+# Copyright (C) 2009-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=btrfs-progs
+PKG_VERSION:=3.17.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs/
+PKG_MD5SUM:=6716b4b109dd909af63ab3becbad67a6
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/btrfs-progs
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  DEPENDS:=+attr +libuuid +zlib +libext2fs +libblkid +liblzo +libpthread
+  TITLE:=Btrfs filesystems utilities
+  URL:=http://btrfs.wiki.kernel.org/
+endef
+
+define Package/btrfs-progs/description
+ Btrfs is a new copy on write filesystem for Linux aimed at implementing
+ advanced features while focusing on fault tolerance, repair and easy
+ administration. Initially developed by Oracle, Btrfs is licensed under the
+ GPL and open for contribution from anyone.
+endef
+
+progs = btrfs btrfsck btrfs-convert btrfs-debug-tree btrfs-find-root \
+       btrfs-image btrfs-map-logical btrfs-show-super btrfstune \
+       btrfs-zero-log fsck.btrfs mkfs.btrfs
+
+
+MAKE_FLAGS+=\
+       CC="$(TARGET_CC)" \
+       CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS)" \
+       prefix=/usr \
+       DESTDIR=$(PKG_INSTALL_DIR) \
+       DISABLE_BACKTRACE=1 \
+       DISABLE_DOCUMENTATION=1
+
+define Package/btrfs-progs/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan
+endef
+
+$(eval $(call BuildPackage,btrfs-progs))
diff --git a/utils/btrfs-progs/files/btrfs-scan.init b/utils/btrfs-progs/files/btrfs-scan.init
new file mode 100644 (file)
index 0000000..f1264ee
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2009 OpenWrt.org
+
+START=19
+
+start() {
+       grep -q btrfs /proc/modules && /usr/bin/btrfsctl -a
+}
+
diff --git a/utils/btrfs-progs/patches/001-fix-xattr-h-include-location.patch b/utils/btrfs-progs/patches/001-fix-xattr-h-include-location.patch
new file mode 100644 (file)
index 0000000..68bbbfc
--- /dev/null
@@ -0,0 +1,44 @@
+--- a/mkfs.c
++++ b/mkfs.c
+@@ -34,7 +34,7 @@
+ #include <getopt.h>
+ #include <uuid/uuid.h>
+ #include <ctype.h>
+-#include <sys/xattr.h>
++#include <attr/xattr.h>
+ #include <blkid/blkid.h>
+ #include <ftw.h>
+ #include "ctree.h"
+--- a/props.c
++++ b/props.c
+@@ -17,7 +17,7 @@
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+-#include <sys/xattr.h>
++#include <attr/xattr.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+--- a/cmds-receive.c
++++ b/cmds-receive.c
+@@ -39,7 +39,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+-#include <sys/xattr.h>
++#include <attr/xattr.h>
+ #include <uuid/uuid.h>
+ #include "ctree.h"
+--- a/cmds-restore.c
++++ b/cmds-restore.c
+@@ -34,7 +34,7 @@
+ #include <regex.h>
+ #include <getopt.h>
+ #include <sys/types.h>
+-#include <sys/xattr.h>
++#include <attr/xattr.h>
+ #include "ctree.h"
+ #include "disk-io.h"
git clone https://git.99rst.org/PROJECT