[Python-modules-commits] r21015 - in packages/python3-dateutil/trunk/debian (rules)

takluyver-guest at users.alioth.debian.org takluyver-guest at users.alioth.debian.org
Mon Apr 2 18:38:58 UTC 2012


    Date: Monday, April 2, 2012 @ 18:38:53
  Author: takluyver-guest
Revision: 21015

Add get-orig-source target

Modified:
  packages/python3-dateutil/trunk/debian/rules

Modified: packages/python3-dateutil/trunk/debian/rules
===================================================================
--- packages/python3-dateutil/trunk/debian/rules	2012-04-02 17:25:59 UTC (rev 21014)
+++ packages/python3-dateutil/trunk/debian/rules	2012-04-02 18:38:53 UTC (rev 21015)
@@ -6,6 +6,11 @@
 
 PY3VERS:=$(shell py3versions -r)
 
+# Grab the version before +dfsg
+DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
+DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
+                               | sed -rne 's,^Version: ([^+]+).*,\1,p')
+
 %:
 	dh $@ --with python3
 
@@ -38,3 +43,16 @@
 	rm -rf build
 	rm -rf dateutil/__pycache__
 	rm -rf dateutil/*/__pycache__
+
+
+get-orig-source:
+	uscan --noconf --force-download --rename --download-current-version --destdir=. $(DEB_DEBIAN_DIR)/..
+	rm -rf python-dateutil-$(DEB_UPSTREAM_VERSION)
+	tar -xf python3-dateutil_$(DEB_UPSTREAM_VERSION).orig.tar.gz
+	rm python3-dateutil_$(DEB_UPSTREAM_VERSION).orig.tar.gz
+	rm python-dateutil-$(DEB_UPSTREAM_VERSION)/dateutil/zoneinfo/zoneinfo-*.tar.gz
+	mv python-dateutil-$(DEB_UPSTREAM_VERSION) python3-dateutil-$(DEB_UPSTREAM_VERSION).orig
+	GZIP=--best tar -cz --owner root --group root --mode a+rX \
+			-f python3-dateutil_$(DEB_UPSTREAM_VERSION)+dfsg1.orig.tar.gz \
+			python3-dateutil-$(DEB_UPSTREAM_VERSION).orig
+	rm -r python3-dateutil-$(DEB_UPSTREAM_VERSION).orig




More information about the Python-modules-commits mailing list