aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2020-05-17 13:18:10 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2020-05-31 11:03:30 +0200
commit4696112ea28299a805ef7de5aff32451adfb2fc3 (patch)
tree0d3eba9ebbbbbdaebebdc2e68517230382b8dd39
parent258dc0d0fd3aae47add9b7dca40848a92d03a4ea (diff)
downloadupstream-4696112ea28299a805ef7de5aff32451adfb2fc3.tar.gz
upstream-4696112ea28299a805ef7de5aff32451adfb2fc3.tar.bz2
upstream-4696112ea28299a805ef7de5aff32451adfb2fc3.zip
build: add zstd support to pack/unpack functions
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
-rw-r--r--include/download.mk1
-rw-r--r--include/unpack.mk4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/download.mk b/include/download.mk
index 14d68bf8f5..9c8ada052b 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -50,6 +50,7 @@ endef
dl_pack/bz2=bzip2 -c > $(1)
dl_pack/gz=gzip -nc > $(1)
dl_pack/xz=xz -zc -7e > $(1)
+dl_pack/zst=zstd -T0 --ultra -20 -c > $(1)
dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1))
define dl_pack
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))
diff --git a/include/unpack.mk b/include/unpack.mk
index 6141b1c722..5bb27d41c9 100644
--- a/include/unpack.mk
+++ b/include/unpack.mk
@@ -31,6 +31,10 @@ ifeq ($(strip $(UNPACK_CMD)),)
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
DECOMPRESS_CMD:=xzcat $(DL_DIR)/$(PKG_SOURCE) |
endif
+ ifeq (zst,$(EXT))
+ EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
+ DECOMPRESS_CMD:=zstdcat $(DL_DIR)/$(PKG_SOURCE) |
+ endif
ifeq ($(filter tgz tbz tbz2 txz,$(EXT1)),$(EXT1))
EXT:=tar
endif