summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-12-02 02:58:03 +0100
committerDave Reisner <dreisner@archlinux.org>2012-12-02 02:58:03 +0100
commite46f4c5723083f952b3e74d118252b4bf4e0b1ef (patch)
treefd6dd56ab15e9ac370a6458e05e14638ad40b2f6
parent71b5da696cc59e22339b5db497032821e631a54f (diff)
downloadmkinitcpio-e46f4c5723083f952b3e74d118252b4bf4e0b1ef.tar.gz
mkinitcpio-e46f4c5723083f952b3e74d118252b4bf4e0b1ef.tar.xz
build: use git-archive to create tarballs
Append generated files afterwards. This preserves symlinks, and probably other things too. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index aa3ef6f..f1114d4 100644
--- a/Makefile
+++ b/Makefile
@@ -64,8 +64,9 @@ clean:
dist: doc
echo $(VERSION) > VERSION
- git ls-files -z | xargs -0 \
- bsdtar -czf mkinitcpio-$(VERSION).tar.gz -s ,^,mkinitcpio-$(VERSION)/, VERSION $(MANPAGES)
+ git archive --format=tar --prefix=mkinitcpio-$(VERSION)/ -o mkinitcpio-$(VERSION).tar HEAD
+ bsdtar -rf mkinitcpio-$(VERSION).tar -s ,^,mkinitcpio-$(VERSION)/, $(MANPAGES) VERSION
+ gzip -9 mkinitcpio-$(VERSION).tar
$(RM) VERSION
version: