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

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Wed Jul 8 18:55:34 UTC 2015


The following commit has been merged in the master branch:
commit 63cc0387280df0fa0c83e1a9e002f5624d68d474
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Wed Jul 8 20:21:41 2015 +0200

    Add get-orig-source target

diff --git a/debian/rules b/debian/rules
index 03aee56..8c8dfb1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,3 +14,20 @@ override_dh_auto_build-indep:
 	rm -f obj-*/docs/jquery.js
 	rm -f obj-*/docs/*.md5
 
+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=97f98a6e04d6ae0bc7c1a7f8003e25b6c364d59b
+get-orig-source:
+	TMPD=`mktemp -d` && \
+		git clone https://github.com/metabrainz/libmusicbrainz \
+			"$$TMPD/libmusicbrainz" && \
+		git --git-dir="$$TMPD/libmusicbrainz/.git" archive \
+			--prefix=libmusicbrainz/ $(COMMIT) | \
+			xz > $$TMPD/libmusicbrainz.tar.xz && \
+		CDATE=`git --git-dir="$$TMPD/libmusicbrainz/.git" show \
+			--format=format:%ci -s $(COMMIT) | \
+			awk '{ gsub(/-/,""); print $$1 }'` && \
+		mv $$TMPD/libmusicbrainz.tar.xz \
+			libmusicbrainz5_$(DEB_UPSTREAM_VER)+git$$CDATE.orig.tar.xz && \
+		rm -rf $$TMPD

-- 
Library to access the MusicBrainz.org database



More information about the pkg-multimedia-commits mailing list