summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2019-04-01 12:31:03 +0200
committerKarel Kočí <karel.koci@nic.cz>2019-04-02 18:11:36 +0200
commit63bc53b98650ca455a98fac3097956943bc73524 (patch)
tree2eae1e6fcf45837af2d427368844f70c99891539
parent160e84e91f58840322e6bafbff0e74c0cb4d33e5 (diff)
btrfs-progs: make zstd optional
This adds choice to compile support for zstd or not. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
-rw-r--r--utils/btrfs-progs/Config.in10
-rw-r--r--utils/btrfs-progs/Makefile11
2 files changed, 19 insertions, 2 deletions
diff --git a/utils/btrfs-progs/Config.in b/utils/btrfs-progs/Config.in
new file mode 100644
index 000000000..013bc8cce
--- /dev/null
+++ b/utils/btrfs-progs/Config.in
@@ -0,0 +1,10 @@
+if PACKAGE_btrfs-progs
+
+config BTRFS_PROGS_ZSTD
+ bool "Build with zstd support"
+ depends on PACKAGE_libzstd
+ default n
+ help
+ This allows you to manage BTRFS with zstd compression
+
+endif
diff --git a/utils/btrfs-progs/Makefile b/utils/btrfs-progs/Makefile
index d7c008c94..6da2bff6e 100644
--- a/utils/btrfs-progs/Makefile
+++ b/utils/btrfs-progs/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=btrfs-progs
PKG_VERSION:=4.20.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
@@ -28,7 +28,7 @@ define Package/btrfs-progs
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
- DEPENDS:=+libattr +libuuid +zlib +zstd +libblkid +liblzo +libpthread
+ DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread +BTRFS_PROGS_ZSTD:libzstd
TITLE:=Btrfs filesystems utilities
URL:=https://btrfs.wiki.kernel.org/
endef
@@ -40,6 +40,10 @@ define Package/btrfs-progs/description
GPL and open for contribution from anyone.
endef
+define Package/btrfs-progs/config
+ source "$(SOURCE)/Config.in"
+endef
+
progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
btrfs-select-super btrfstune mkfs.btrfs
@@ -53,6 +57,9 @@ CONFIGURE_ARGS += \
--disable-convert \
--disable-documentation \
--disable-python
+ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
+CONFIGURE_ARGS += --disable-zstd
+endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib