[projects/geninitrd] put version into release tarball

glen glen at pld-linux.org
Thu Dec 26 16:06:52 CET 2013


commit 3bc5fb9f000ec626e2977f975e84ad8fccd88653
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Dec 26 17:06:20 2013 +0200

    put version into release tarball

 Makefile | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/Makefile b/Makefile
index c294c3a..d0a773c 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ refentry2man := /usr/bin/refentry2man
 $(NAME).8: $(NAME).8.xml $(refentry2man)
 	$(refentry2man) < $< > $@.tmp && mv $@.tmp $@ || { rm -f $@.tmp; exit 1; }
 
-dist: clean $(NAME)-$(VERSION).tar.gz
+dist: $(NAME)-$(VERSION).tar.gz
 	@echo
 	@echo "Do not forget to tag the release"
 	@echo
@@ -47,13 +47,11 @@ clean:
 ChangeLog:
 	./changelog.sh
 
-$(NAME)-$(VERSION).tar.gz: $(NAME)-$(VERSION).tar
-	gzip -9 $<
-
-$(NAME)-$(VERSION).tar: $(NAME).8 ChangeLog
+$(NAME)-$(VERSION).tar.gz: $(NAME).8 ChangeLog
 	rm -rf $(NAME)-$(VERSION)
 	install -d $(NAME)-$(VERSION)
-	git archive HEAD --prefix $(NAME)-$(VERSION)/ -o $@
+	git archive HEAD | tar -x -C $(NAME)-$(VERSION)/
+	sed -i -e "s/VERSION='devel'/VERSION='$(VERSION)'/" $(NAME)-$(VERSION)/$(NAME)
 	cp -p $? $(NAME)-$(VERSION)
-	tar -rvf $@ --owner=root --group=root $(NAME)-$(VERSION)/*
+	tar -czf $@ --owner=root --group=root $(NAME)-$(VERSION)
 	rm -rf $(NAME)-$(VERSION)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/geninitrd.git/commitdiff/3bc5fb9f000ec626e2977f975e84ad8fccd88653



More information about the pld-cvs-commit mailing list