[Pkg-mono-svn-commits] rev 3992 - xsp/trunk/debian

Jo Shields directhex-guest at alioth.debian.org
Sun May 24 22:11:58 UTC 2009


Author: directhex-guest
Date: 2009-05-24 22:11:58 +0000 (Sun, 24 May 2009)
New Revision: 3992

Modified:
   xsp/trunk/debian/changelog
   xsp/trunk/debian/rules
Log:
get-orig-source rule


Modified: xsp/trunk/debian/changelog
===================================================================
--- xsp/trunk/debian/changelog	2009-05-14 07:17:29 UTC (rev 3991)
+++ xsp/trunk/debian/changelog	2009-05-24 22:11:58 UTC (rev 3992)
@@ -1,9 +1,11 @@
 xsp (2.0-3) UNRELEASED; urgency=low
 
+  * debian/rules:
+    + Implement reliable get-orig-source rule which repacks from bz2
   * po/es.po:
     + Updated Spanish translation. (Closes: #525788)
 
- -- Jo Shields <directhex at apebox.org>  Mon, 27 Apr 2009 09:22:11 +0100
+ -- Jo Shields <directhex at apebox.org>  Sun, 24 May 2009 22:52:44 +0100
 
 xsp (2.0-2) unstable; urgency=low
 

Modified: xsp/trunk/debian/rules
===================================================================
--- xsp/trunk/debian/rules	2009-05-14 07:17:29 UTC (rev 3991)
+++ xsp/trunk/debian/rules	2009-05-24 22:11:58 UTC (rev 3992)
@@ -8,6 +8,14 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+MAKEFILE = $(firstword $(MAKEFILE_LIST))
+DEBIAN_DIR = $(dir $(MAKEFILE))
+SOURCE_DIR = $(DEBIAN_DIR)/..
+
+DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Version | cut -d" " -f2)
+DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)
+VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1 | sed 's/+dfsg.*//')
+
 # Perl code to figure out the current version and the next "potential" version
 DPKG_VERSION ?= $(shell head -n 1 debian/changelog  | cut -f 2 -d '(' | cut -f 1 -d ')')
 PKG_VERSION ?= $(shell echo $(DPKG_VERSION) | cut -f 1 -d '-' | cut -f 1-3 -d '.')
@@ -159,4 +167,19 @@
 	dh_md5sums -i
 	dh_builddeb -i
 
+get-orig-source:
+	[ -d ../tarballs ] || mkdir ../tarballs
+	uscan \
+		--package $(DEB_SOURCE_NAME) \
+		--watchfile $(DEBIAN_DIR)/watch \
+		--upstream-version $(VERSION) \
+		--download-version $(VERSION) \
+		--destdir ../tarballs \
+		--force-download \
+		--rename
+	bzcat ../tarballs/$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.bz2 | \
+		gzip -9fn -c - > ../tarballs/$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz
+	rm ../tarballs/$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.bz2
+
+
 .PHONY: build clean binary-arch binary-indep binary install patch unpatch




More information about the Pkg-mono-svn-commits mailing list