[SCM] sord/master: Implement a mechanism to repack the upstream tarball.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Sun Sep 2 15:46:51 UTC 2012
The following commit has been merged in the master branch:
commit 4b78d1e028931437008289c66e77b263938f850b
Author: Alessio Treglia <alessio at debian.org>
Date: Sun Sep 2 17:41:43 2012 +0200
Implement a mechanism to repack the upstream tarball.
diff --git a/debian/rules b/debian/rules
index 6d3db5f..ce7db9c 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')
+
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LDFLAGS+=-Wl,--as-needed
WAF = ./waf
@@ -30,3 +34,17 @@ override_dh_auto_install:
override_dh_strip:
dh_strip -plibsord-0-0 --dbg-package=sord-dbg
dh_strip --remaining-packages
+
+# 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)
+ xz -9fz $(pkg)_$(dfsg_version).orig.tar
+ rm -rf $(pkg)-$(dfsg_version)
--
sord packaging
More information about the pkg-multimedia-commits
mailing list