summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-04-12 14:37:08 +0200
committerAlejandro Colomar <alx@kernel.org>2023-04-12 14:52:05 +0200
commit69ad95988f40648ea21d96f248ea54ab7ca082fa (patch)
tree46d093440f083e136978d42914e0022775a95a4c
parent254fe38b229dd37f9128fa39d4e8a29d40433388 (diff)
*.mk: dist, dist-lz: Create tarballs compressed with lzip(1)
Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--Makefile1
-rw-r--r--lib/cmd.mk1
-rw-r--r--lib/dist.mk7
3 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 037d879dc..6931d7bce 100644
--- a/Makefile
+++ b/Makefile
@@ -104,6 +104,7 @@ help:
$(info dist-tar Create a tarball of the repository)
$(info dist-bz2 Create a compressed tarball (.tar.bz2))
$(info dist-gz Create a compressed tarball (.tar.gz))
+ $(info dist-lz Create a compressed tarball (.tar.lz))
$(info dist-xz Create a compressed tarball (.tar.xz))
$(info )
$(info help Print this help)
diff --git a/lib/cmd.mk b/lib/cmd.mk
index 7af9d112b..92b469fc3 100644
--- a/lib/cmd.mk
+++ b/lib/cmd.mk
@@ -20,6 +20,7 @@ HEAD := head
INSTALL := install
LN := ln
LOCALE := locale
+LZIP := lzip
PKGCONF := pkgconf
SED := sed
SORT := sort
diff --git a/lib/dist.mk b/lib/dist.mk
index de1042bc1..d3c04d147 100644
--- a/lib/dist.mk
+++ b/lib/dist.mk
@@ -31,7 +31,7 @@ _DISTPAGES := $(filter $(_DISTDIR)/man%,$(_DISTFILES))
_DISTOTHERS := $(filter-out $(_DISTDIR)/man%,$(_DISTFILES))
DISTFILE := $(builddir)/$(DISTNAME).tar
-compression := bz2 gz xz
+compression := bz2 gz lz xz
dist := $(foreach x,$(compression),dist-$(x))
@@ -63,6 +63,11 @@ $(DISTFILE).gz: %.gz: % | $$(@D)/
$(info GZIP $@)
$(GZIP) -knf $<
+$(DISTFILE).lz: %.lz: % | $$(@D)/
+ $(info LZIP $@)
+ $(LZIP) -kf $<
+ touch $@
+
$(DISTFILE).xz: %.xz: % | $$(@D)/
$(info XZ $@)
$(XZ) -kf $<