[Python-modules-commits] [python-peak.util] 01/01: Enhance get-origin-source

Daniele Tricoli eriol-guest at moszumanska.debian.org
Sat Feb 6 17:33:08 UTC 2016


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

eriol-guest pushed a commit to branch master
in repository python-peak.util.

commit 731c4302120d7cadeb2858f8459c04d86fa9a870
Author: Daniele Tricoli <eriol at mornie.org>
Date:   Sat Feb 6 18:31:47 2016 +0100

    Enhance get-origin-source
---
 debian/rules | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/debian/rules b/debian/rules
index e1e67bf..2006181 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,7 @@
 
 PKG = python-peak.util
 VERSION = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f2 | sed 's,-.*,,')
+GOS_TMP_DIR := $(shell mktemp -d $(PKG)-XXXXXXXXX)
 
 UPSTREAMS = \
 	addons-0.7 \
@@ -10,11 +11,13 @@ UPSTREAMS = \
 	proxies-0.9 \
 	symboltype-1.0
 
+# This is needed by setup.py multiplexer.
 export SUBDIRS = $(subst .,-,$(UPSTREAMS))
 
 PKG_PREFIX = peak.util-
 
-USCAN_EXTRA_ARGS = --repack --download --destdir $(CURDIR)/
+USCAN_EXTRA_ARGS = --repack --download --destdir $(GOS_TMP_DIR)/
+TAR_EXTRA_ARGS = --owner root --group root --mode a+rX
 
 %:
 	dh $@ --with python2
@@ -35,11 +38,12 @@ get-orig-source:
 			--watchfile debian/$(PKG_PREFIX)`echo $$upstream | cut -d- -f1`.watch $(USCAN_EXTRA_ARGS) \
 			--upstream-version 0 --download-version `echo $$upstream | cut -d- -f2` \
 			--package `echo $(PKG_PREFIX)$$upstream | cut -d- -f1-2`; \
-		mv $(CURDIR)/`echo $(PKG_PREFIX)$$upstream | cut -d- -f1-2`_`echo $$upstream | cut -d- -f2`.orig.tar.gz \
-		   $(CURDIR)/$(PKG)_$(VERSION).orig-`echo $$upstream | tr . -`.tar.gz; \
+		mv $(GOS_TMP_DIR)/`echo $(PKG_PREFIX)$$upstream | cut -d- -f1-2`_`echo $$upstream | cut -d- -f2`.orig.tar.gz \
+		   $(GOS_TMP_DIR)/$(PKG)_$(VERSION).orig-`echo $$upstream | tr . -`.tar.gz; \
 	done
-	rm *.zip
 	# Create manually the empty main package
-	mkdir $(CURDIR)/$(PKG)-$(VERSION)
-	cd $(CURDIR); tar czf $(PKG)_$(VERSION).orig.tar.gz $(PKG)-$(VERSION)
-	rmdir $(CURDIR)/$(PKG)-$(VERSION)
+	mkdir $(GOS_TMP_DIR)/$(PKG)-$(VERSION)
+	cd $(GOS_TMP_DIR); GZIP=--best; tar -cz $(TAR_EXTRA_ARGS) -f $(PKG)_$(VERSION).orig.tar.gz $(PKG)-$(VERSION)
+	rmdir $(GOS_TMP_DIR)/$(PKG)-$(VERSION)
+	mv $(GOS_TMP_DIR)/$(PKG)_$(VERSION).orig* $(CURDIR)
+	rm -Rf $(GOS_TMP_DIR)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-peak.util.git



More information about the Python-modules-commits mailing list