]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
dist.mk: Create tarballs with a top-level directory
authorAlejandro Colomar <alx.manpages@gmail.com>
Sat, 30 Jul 2022 18:31:40 +0000 (20:31 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Mon, 1 Aug 2022 12:19:21 +0000 (14:19 +0200)
Need to use a trick with sed(1) to avoid tar(1) modifying the
symlinks.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
lib/dist.mk

index 7798d59a193116fc47937c82c8b0014577170b43..570c81f2c86cc754d2812fe470bb855d38da6756 100644 (file)
@@ -21,7 +21,8 @@ $(DISTFILE): $(shell git ls-files 2>/dev/null) | $$(@D)/.
        $(info TAR      $@)
        tar cf $@ -T /dev/null
        git ls-files \
-       | xargs tar rf $@
+       | sed 's,^,./,' \
+       | xargs tar rf $@ -C $(srcdir) --transform 's,^\.,$(DISTNAME),'
 
 $(DISTFILE).gz: %.gz: % | $$(@D)/.
        $(info GZIP     $@)