[python-sfml] 07/08: Use uscan to repack tarball to simplify debian/rules

James Cowgill jcowgill-guest at moszumanska.debian.org
Sat Mar 14 16:39:25 UTC 2015


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

jcowgill-guest pushed a commit to branch master
in repository python-sfml.

commit d6685998cbfdaf90c8502875dc1a88a6ca34d692
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Mon Mar 9 23:20:58 2015 +0000

    Use uscan to repack tarball to simplify debian/rules
---
 debian/copyright |  6 ++++++
 debian/rules     | 32 +++-----------------------------
 2 files changed, 9 insertions(+), 29 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index 3eec9e2..d76f731 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,6 +1,12 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: python-sfml
 Source: http://www.python-sfml.org/
+Files-Excluded:
+ examples/embedding/image.jpg
+ examples/extending/image.jpg
+ examples/*/resources/
+ examples/*/data/
+ tests/runtests.py
 
 Files: *
 Copyright:
diff --git a/debian/rules b/debian/rules
index bcb0595..e29403a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,11 +9,7 @@ export PYBUILD_INSTALL_ARGS=--skip-build
 export PYBUILD_TEST_PYTEST=1
 export PYBUILD_TEST_ARGS=$(CURDIR)/tests
 
-PKD   = $(abspath $(dir $(MAKEFILE_LIST)))
-PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
-UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
-DTYPE = +dfsg
-VER  ?= $(subst 1.5.1.is.,,$(subst $(DTYPE),,$(UVER)))
+PKD = $(abspath $(dir $(MAKEFILE_LIST)))
 
 %:
 	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
@@ -32,27 +28,5 @@ override_dh_auto_clean:
 
 # http://wiki.debian.org/onlyjob/get-orig-source
 .PHONY: get-orig-source
-get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
-	@
-
-$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
-	@echo "# Downloading..."
-	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
-	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
-	@echo "# Extracting..."
-	mkdir $(PKG)-$(VER) \
-	 && tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
-	 || $(RM) -r $(PKG)-$(VER)
-	@echo "# Cleaning-up..."
-	cd $(PKG)-$(VER) \
-	 && $(RM) -r -v \
-		examples/embedding/image.jpg \
-		examples/extending/image.jpg \
-		examples/*/resources/ \
-		examples/*/data/ \
-		tests/runtests.py
-	#$(RM) -v $(PKG)_$(VER).orig.tar.*
-	@echo "# Packing..."
-	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
-	 | XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
-	 && $(RM) -r "$(PKG)-$(VER)"
+get-orig-source:
+	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --repack --compression=xz --download-current-version $(PKD)

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



More information about the Pkg-games-commits mailing list