[SCM] soundconverter/master: Add get-orig-source target

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Sun Oct 11 22:18:40 UTC 2015


The following commit has been merged in the master branch:
commit 33effaae73c240cb9b2c1bc09dcd20e28069099f
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Mon Oct 12 00:09:38 2015 +0200

    Add get-orig-source target

diff --git a/debian/rules b/debian/rules
index ce6bd0c..eb032b8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,3 +8,20 @@ override_dh_auto_configure:
 
 override_dh_auto_test:
 
+DEB_DEBDIR=$(dir $(firstword $(MAKEFILE_LIST)))
+DEB_UPSTREAM_VER=$(shell dpkg-parsechangelog -l$(DEB_DEBDIR)/changelog \
+	| sed -ne 's/^Version: \(.*\)-[^-]*/\1/p' | sed -ne 's/^\([^+]*\)+git.*/\1/p')
+COMMIT=c483b2ca30696a3ba18930ef244ac8620e04662a
+get-orig-source:
+	TMPD=`mktemp -d` && \
+		git clone https://github.com/kassoulet/soundconverter \
+			"$$TMPD/soundconverter" && \
+		git --git-dir="$$TMPD/soundconverter/.git" archive \
+			--prefix=soundconverter/ $(COMMIT) | \
+			xz > $$TMPD/soundconverter.tar.xz && \
+		CDATE=`git --git-dir="$$TMPD/soundconverter/.git" show \
+			--format=format:%ci -s $(COMMIT) | \
+			awk '{ gsub(/-/,""); print $$1 }'` && \
+		mv $$TMPD/soundconverter.tar.xz \
+			soundconverter_$(DEB_UPSTREAM_VER)+git$$CDATE.orig.tar.xz && \
+		rm -rf $$TMPD

-- 
soundconverter packaging



More information about the pkg-multimedia-commits mailing list