[dhewm3] 01/13: Use Files-Excluded: from d/copyright also for get-orig-source

Tobias Frost tobi at moszumanska.debian.org
Thu Mar 12 10:25:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

tobi pushed a commit to branch master
in repository dhewm3.

commit f986960c890dc1fa260f1487f3925ce173de3e1c
Author: Tobias Frost <tobi at coldtobi.de>
Date:   Thu Mar 12 07:50:27 2015 +0100

    Use Files-Excluded: from d/copyright also for get-orig-source
---
 debian/rules | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/debian/rules b/debian/rules
index 2990db5..d54ce1e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,26 +20,27 @@ PKD   = $(abspath $(dir $(MAKEFILE_LIST)))
 PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
 VER  ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog  -SVersion | sed -e s/^.*git// -e s/+repack// | cut -d- -f1 )
 DTYPE = +repack
-UPSVER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog -SVersion | cut -d~ -f1)
+UPSVER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog -SVersion | cut -d+ -f1)
 
 ## from: https://wiki.debian.org/onlyjob/get-orig-source
 .PHONY: get-orig-source
-get-orig-source: $(PKG)_$(UPSVER)~git$(VER)$(DTYPE).orig.tar.xz
-	#$(info I: $(UPSVER$)~$(PKG)_$(VER)$(DTYPE))
+get-orig-source: $(PKG)_$(UPSVER)+git$(VER)$(DTYPE).orig.tar.xz
+	#$(info I: $(UPSVER$)+$(PKG)_$(VER)$(DTYPE))
 	@
 
 UDATE = $(shell date --rfc-3339=seconds --date='TZ="UTC" \
-	$(shell echo ~git$(VER) | perl -ne 'print "$$1-$$2-$$3" if m/\~(?:git|svn|hg)(\d{4})(\d{2})(\d{2})/')')
+	$(shell echo +git$(VER) | perl -ne 'print "$$1-$$2-$$3" if m/\+(?:git|svn|hg)(\d{4})(\d{2})(\d{2})/')')
 
-$(PKG)_$(UPSVER)~git$(VER)$(DTYPE).orig.tar.xz:
+$(PKG)_$(UPSVER)+git$(VER)$(DTYPE).orig.tar.xz:
 	@echo DEBUG: VER=$(VER) UDATE=$(UDATE) UPSVER=$(UPSVER)
-	echo "$(PKG)_$(UPSVER)~git$(VER)$(DTYPE).orig.tar.xz"
+	@echo "$(PKG)_$(UPSVER)+git$(VER)$(DTYPE).orig.tar.xz"
+	@echo $(VER) | grep '^[0-9]*$$' || ( echo Cannot find timestamp in package version. Please specify VER, see README.source. Aborting.. ; exit 1 )
 	#$(info I: UDATE=$(UDATE))
-	$(if $(wildcard $(PKG)-$(UPSVER)~git$(VER)),$(error $(PKG)-$(UPSVER)~git$(VER) exist, aborting..))
+	$(if $(wildcard $(PKG)-$(UPSVER)+git$(VER)),$(error $(PKG)-$(UPSVER)+git$(VER) exist, aborting..))
 	@echo "# Downloading..."
-	git clone $(UURL) $(PKG)-$(UPSVER)~git$(VER) \
-	|| $(RM) -r $(PKG)-$(UPSVER)~git$(VER)
-	cd $(PKG)-$(UPSVER)~git$(VER) \
+	git clone $(UURL) $(PKG)-$(UPSVER)+git$(VER) \
+	|| $(RM) -r $(PKG)-$(UPSVER)+git$(VER)
+	cd $(PKG)-$(UPSVER)+git$(VER) \
 	&& git checkout v$(VER) || git checkout $$(git log -n1 --format=%h --before="$(UDATE)") \
 	&& ( echo "# Generating ChangeLog..." \
 	&& git log --pretty="format:%ad  %aN  <%aE>%n%n%x09* %s%n" --date=short > ChangeLog \
@@ -47,11 +48,9 @@ $(PKG)_$(UPSVER)~git$(VER)$(DTYPE).orig.tar.xz:
 	&& echo "# Setting times..." \
 	&& for F in $$(git ls-tree -r --name-only HEAD); do touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; done \
 	&& echo "# Cleaning-up..." \
-	&& $(RM) -r -v \
-	  neo/tools/common/PropTree/* neo/sys/win32/* neo/sys/linux/setup/*/bin/* \
-	  neo/sys/linux/setup/lokisetup neo/sys/linux/setup/image-*  neo/sys/linux/setup/makeself \
+	&& $(RM) -r -v $$(awk 'BEGIN{RS=ORS="\n\n";FS=OFS="\n"}/Files-Excluded:/' $(PKD)/copyright | sed s/Files-Excluded://) \
 	&& $(RM) -r .git .git*
 	@echo "# Packing..."
-	find -L "$(PKG)-$(UPSVER)~git$(VER)" -xdev -type f -print | sort \
-	| XZ_OPT="-6v" tar -caf "$(PKG)_$(UPSVER)~git$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
-	&& $(RM) -r "$(PKG)-$(UPSVER)~git$(VER)"
+	find -L "$(PKG)-$(UPSVER)+git$(VER)" -xdev -type f -print | sort \
+	| XZ_OPT="-6v" tar -caf "$(PKG)_$(UPSVER)+git$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
+	&& $(RM) -r "$(PKG)-$(UPSVER)+git$(VER)"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/dhewm3.git



More information about the Pkg-games-commits mailing list