From 73ecc3e2012ac3030d0682d093875fe5a5b2e521 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Tue, 4 Aug 2020 11:48:45 +0200 Subject: Makefile: add a mageiadist command to create a tarball and a patch for usage in Mageia specfile --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a375a2f3..9e3f4fb8 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ clean-mageia: # Remove the files we've added @for i in $(Mageia_FILES);do rm -f $$i;done # Try to remove any empty directories caused by the files we've removed - @for i in $(Mageia_SUBDIRS);do [ -d "$$1" ] && [ ! -h "$$1" ] && rmdir "$$1" 2> /dev/null;done + @for i in $(Mageia_SUBDIRS);do [ -d "$$1" ] && [ ! -h "$$1" ] && rmdir "$$1" 2> /dev/null || :;done tag: @git tag -a -f -m "$(VERSION) release" $(VERSION) @@ -148,3 +148,14 @@ archive: clean @gzip -f initscripts-$(VERSION).tar @rm -rf initscripts-$(VERSION) @echo "The archive is at initscripts-$(VERSION).tar.gz" + + +mageiadist: clean + @git archive --format=tar --prefix=initscripts-$(VERSION)/ HEAD ':po-mageia' ':man-mageia' > initscripts-$(VERSION)-mageia.tar + @mkdir -p initscripts-$(VERSION)/ + @tar --append -f initscripts-$(VERSION)-mageia.tar initscripts-$(VERSION) + @gzip -f initscripts-$(VERSION)-mageia.tar + @rm -rf initscripts-$(VERSION) + @echo "The Mageia archive is at initscripts-$(VERSION)-mageia.tar.gz" + @git diff 10.04...distro/mga ':!po-mageia' ':!man-mageia' > initscripts-$(VERSION)-mageia.patch + @echo "The Mageia patch is at initscripts-$(VERSION)-mageia.patch" -- cgit v1.2.1