[SCM] lv2/master: Add get-orig-source target to strip out waf.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Thu Oct 18 00:57:49 UTC 2012


The following commit has been merged in the master branch:
commit 02a263bde23e2a2696f1efc1642359d4702fe598
Author: Alessio Treglia <alessio at debian.org>
Date:   Thu Oct 18 01:57:39 2012 +0100

    Add get-orig-source target to strip out waf.

diff --git a/debian/rules b/debian/rules
index 950aa1a..9284e85 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,10 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+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')
+
 WAF = ./waf
 
 PLUGINS = amp sampler
@@ -33,3 +37,17 @@ override_dh_install:
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS
+
+# get-orig-source to drop waf
+get-orig-source:
+	uscan --noconf --force-download --rename --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-*
+	find $(pkg)-$(dfsg_version)/ -name '*.pyc' -delete
+	tar cf $(pkg)_$(dfsg_version).orig.tar $(pkg)-$(dfsg_version)
+	bzip2 -9f $(pkg)_$(dfsg_version).orig.tar
+	rm -rf $(pkg)-$(dfsg_version)

-- 
lv2 packaging



More information about the pkg-multimedia-commits mailing list