[Python-modules-commits] r13615 - in packages/python-django-voting/trunk/debian (rules)

ockham-guest at users.alioth.debian.org ockham-guest at users.alioth.debian.org
Fri Jun 25 11:00:27 UTC 2010


    Date: Friday, June 25, 2010 @ 11:00:12
  Author: ockham-guest
Revision: 13615

Add get-orig-source target

Modified:
  packages/python-django-voting/trunk/debian/rules

Modified: packages/python-django-voting/trunk/debian/rules
===================================================================
--- packages/python-django-voting/trunk/debian/rules	2010-06-25 08:18:39 UTC (rev 13614)
+++ packages/python-django-voting/trunk/debian/rules	2010-06-25 11:00:12 UTC (rev 13615)
@@ -1,4 +1,20 @@
 #!/usr/bin/make -f
 
+# Adapted from http://wiki.debian.org/SandroTosi/Svn_get-orig-source
+PACKAGE = python-django-voting
+SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
+TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
+.PHONY: get-orig-source
+
 %:
 	dh --buildsystem=python_distutils $@
+
+get-orig-source:
+	rm -rf get-orig-source $(TARBALL)
+	mkdir get-orig-source
+	svn export -r $(SVN_REVISION) http://django-voting.googlecode.com/svn/trunk/ \
+	get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
+	GZIP='--best --no-name' tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
+	rm -rf get-orig-source
+	echo "  "$(TARBALL)" created; move it to the right destination to build the package"




More information about the Python-modules-commits mailing list