[SCM] a2jmidid/master: Setup repacking mechanism to regenerate the upstream tarball.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Thu Aug 2 11:26:59 UTC 2012


The following commit has been merged in the master branch:
commit a0993dfd00d00f9f952b70f71d91fa2efc81d8b0
Author: Alessio Treglia <alessio at debian.org>
Date:   Thu Aug 2 13:13:29 2012 +0200

    Setup repacking mechanism to regenerate the upstream tarball.

diff --git a/debian/rules b/debian/rules
index ddbca57..636c12e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,9 @@
 #!/usr/bin/make -f
 
+upstream_version ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)(\+dfsg\d+)?.*$$/\1/p')
+dfsg_version = $(upstream_version)~dfsg0
+pkg = $(shell dpkg-parsechangelog | sed -ne 's/^Source: //p')
+
 %:
 	dh $@ --with python2
 
@@ -20,3 +24,15 @@ override_dh_auto_install:
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS
+
+# get-orig-source to drop waf
+get-orig-source:
+	uscan --noconf --force-download --rename --repack --download-current-version --destdir=.
+	tar -xf $(pkg)_$(upstream_version).orig.tar.bz2
+	mv $(pkg)-$(upstream_version) $(pkg)-$(dfsg_version)
+	cd $(pkg)-$(dfsg_version) ; python waf --help > /dev/null
+	mv $(pkg)-$(dfsg_version)/.waf-*/* $(pkg)-$(dfsg_version)
+	sed -i '/^#==>$$/,$$d' $(pkg)-$(dfsg_version)/waf
+	rmdir $(pkg)-$(dfsg_version)/.waf-*
+	BZIP="-9f" tar -czf $(pkg)_$(dfsg_version).orig.tar.bz2 $(pkg)-$(dfsg_version)
+	rm -rf $(pkg)-$(dfsg_version)
diff --git a/debian/watch b/debian/watch
index 14cef37..3b5803d 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,3 @@
 version=3
+opts=dversionmangle=s/~dfsg\d+$// \
 http://download.gna.org/a2jmidid/a2jmidid-(.*)\.tar\.bz2

-- 
a2jmidid packaging



More information about the pkg-multimedia-commits mailing list