[Python-modules-commits] r18753 - in packages/python-peak.rules/trunk/debian (rules)

eriol-guest at users.alioth.debian.org eriol-guest at users.alioth.debian.org
Wed Sep 28 14:35:26 UTC 2011


    Date: Wednesday, September 28, 2011 @ 14:35:24
  Author: eriol-guest
Revision: 18753

Fixed get-orig-source target to comply Debian Policy 4.9

Modified:
  packages/python-peak.rules/trunk/debian/rules

Modified: packages/python-peak.rules/trunk/debian/rules
===================================================================
--- packages/python-peak.rules/trunk/debian/rules	2011-09-28 11:22:38 UTC (rev 18752)
+++ packages/python-peak.rules/trunk/debian/rules	2011-09-28 14:35:24 UTC (rev 18753)
@@ -1,7 +1,9 @@
 #!/usr/bin/make -f
 PKG = python-peak.rules
 VERSION = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f2 | sed 's,-.*,,')
-TARBALLS_DIR = $$PWD"/../tarballs/"
+DEB_ROOT = $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../)
+GOS_TMP_DIR = $(DEB_ROOT)/get-orig-source
+PWD := $(shell pwd)
 
 PRIORITIZED_METHODS = prioritized_methods-0.2.2dev-20110830
 DEB_PRIORITIZED_METHODS_DIR = $(subst _,-,$(subst .,-,$(PRIORITIZED_METHODS)))
@@ -27,15 +29,17 @@
 	dh_installdocs
 
 get-orig-source:
-	set -e;
-	uscan --force-download --destdir $(TARBALLS_DIR) --no-symlink;
+	test -d $(GOS_TMP_DIR) || mkdir $(GOS_TMP_DIR)
+	uscan --force-download --destdir $(GOS_TMP_DIR) --no-symlink;
 	uscan --no-conf \
 		--watchfile debian/`echo $(PRIORITIZED_METHODS) | cut -d- -f1`.watch \
 		--upstream-version 0 --download-version `echo $(PRIORITIZED_METHODS) | cut -d- -f2,3` \
-		--download --destdir $(TARBALLS_DIR)/ --no-symlink;
-	mv $(TARBALLS_DIR)/$(PRIORITIZED_METHODS).tar.gz \
-		$(TARBALLS_DIR)/$(PKG)_$(VERSION).orig-`echo $(PRIORITIZED_METHODS) | tr ._ -`.tar.gz;
+		--download --destdir $(GOS_TMP_DIR) --no-symlink;
+	mv $(GOS_TMP_DIR)/$(PRIORITIZED_METHODS).tar.gz \
+		$(GOS_TMP_DIR)/$(PKG)_$(VERSION).orig-`echo $(PRIORITIZED_METHODS) | tr ._ -`.tar.gz;
 	# Create manually the empty main package
-	mkdir $(TARBALLS_DIR)/$(PKG)-$(VERSION)
-	cd $(TARBALLS_DIR); tar czf $(PKG)_$(VERSION).orig.tar.gz $(PKG)-$(VERSION)
-	rmdir $(TARBALLS_DIR)/$(PKG)-$(VERSION)
+	mkdir $(GOS_TMP_DIR)/$(PKG)-$(VERSION)
+	cd $(GOS_TMP_DIR); tar czf $(PKG)_$(VERSION).orig.tar.gz $(PKG)-$(VERSION)
+	rmdir $(GOS_TMP_DIR)/$(PKG)-$(VERSION)
+	mv $(GOS_TMP_DIR)/$(PKG)_$(VERSION).orig* $(PWD)
+	rm -Rf $(GOS_TMP_DIR)




More information about the Python-modules-commits mailing list