[Python-modules-commits] r7126 - in packages/python-pyevent/trunk/debian (changelog rules)

luciano at users.alioth.debian.org luciano at users.alioth.debian.org
Fri Dec 19 20:05:19 UTC 2008


    Date: Friday, December 19, 2008 @ 20:05:18
  Author: luciano
Revision: 7126

get-orig-source in the http://wiki.debian.org/SandroTosi/Svn_get-orig-source style. Which is much better than mine.

Modified:
  packages/python-pyevent/trunk/debian/changelog
  packages/python-pyevent/trunk/debian/rules

Modified: packages/python-pyevent/trunk/debian/changelog
===================================================================
--- packages/python-pyevent/trunk/debian/changelog	2008-12-19 19:27:45 UTC (rev 7125)
+++ packages/python-pyevent/trunk/debian/changelog	2008-12-19 20:05:18 UTC (rev 7126)
@@ -1,4 +1,4 @@
-python-event (0.3.svn54-1) UNRELEASED; urgency=low
+python-event (0.3+svn54-1) UNRELEASED; urgency=low
 
   * Initial release (Closes: #504729)
 

Modified: packages/python-pyevent/trunk/debian/rules
===================================================================
--- packages/python-pyevent/trunk/debian/rules	2008-12-19 19:27:45 UTC (rev 7125)
+++ packages/python-pyevent/trunk/debian/rules	2008-12-19 20:05:18 UTC (rev 7126)
@@ -4,8 +4,12 @@
 
 #PYVERS=$(shell pyversions -r)
 PYTHON := /usr/bin/python
-UPVERSION:=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/'| cut -f 1,2 -d '.')
+
+PACKAGE = python-event
 URL:=http://pyevent.googlecode.com/svn/trunk/
+SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
+SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
+TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
 
 clean:
 	dh_testdir
@@ -45,21 +49,15 @@
 	dh_md5sums
 	dh_builddeb
 
-export:
+get-orig-source:
 	@@dh_testdir
-	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
-	@@echo Downloading python-event from $(URL) ...
+	rm -rf get-orig-source $(TARBALL)
+	mkdir get-orig-source
+	svn export -r $(SVN_REVISION) $(URL) \
+	       get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
+	GZIP=--best 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"
 
-cleaning-up: export
-	@@dh_testdir
-	@@svn checkout $(URL) ../tarballs/python-event
-	@@echo Cleaning up ...
-	@@rm -rf ../tarballs/python-event/pyevent 
-
-get-orig-source: cleaning-up
-	@@dh_testdir
-	@@cd ../tarballs ; \
-	    tar czf python-event_$(UPVERSION).svn$(shell svn info ../tarballs/python-event/ | grep Revision | cut -f 2 -d " ").orig.tar.gz python-event --exclude=.svn
-
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install




More information about the Python-modules-commits mailing list