[SCM] cmus/master: Prepare to import upstream git snapshot

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Sun Mar 6 20:39:06 UTC 2016


The following commit has been merged in the master branch:
commit f9d44c59e39938c4d32bf3f55bb24621529f1591
Author: Sebastian Ramacher <sebastian at ramacher.at>
Date:   Sun Mar 6 21:25:07 2016 +0100

    Prepare to import upstream git snapshot

diff --git a/debian/rules b/debian/rules
index 067aede..140c787 100755
--- a/debian/rules
+++ b/debian/rules
@@ -40,3 +40,21 @@ override_dh_shlibdeps:
 		$(foreach plugin,$(EXTRA_CMUS_PLUGINS),$(EXTRA_CMUS_DIR_OP_PLUGINS)$(plugin)) \
 		>> debian/cmus.substvars
 	dh_shlibdeps --remaining-packages
+
+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=6704e786e6dcc28b3f989cf3f5ca22a36033472d
+get-orig-source:
+	TMPD=`mktemp -d` && \
+		git clone https://github.com/cmus/cmus \
+			"$$TMPD/cmus" && \
+		git --git-dir="$$TMPD/cmus/.git" archive \
+			--prefix=cmus/ $(COMMIT) | \
+			xz > $$TMPD/cmus.tar.xz && \
+		CDATE=`git --git-dir="$$TMPD/cmus/.git" show \
+			--format=format:%ci -s $(COMMIT) | \
+			awk '{ gsub(/-/,""); print $$1 }'` && \
+		mv $$TMPD/cmus.tar.xz \
+			cmus_$(DEB_UPSTREAM_VER)+git$$CDATE.orig.tar.xz && \
+		rm -rf $$TMPD
diff --git a/debian/watch b/debian/watch
index 2748390..ffe6dd3 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
 version=3
-opts="uversionmangle=s/([\d\.]+)-(rc|beta)(.*)/\1~\2\3/,filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/cmus-$1\.tar\.gz/" \
+opts="dversionmangle=s/\+git\d+$//,uversionmangle=s/([\d\.]+)-(rc|beta)(.*)/\1~\2\3/,filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/cmus-$1\.tar\.gz/" \
 https://github.com/cmus/cmus/tags .*/v?(\d\S*)\.tar\.gz

-- 
cmus packaging



More information about the pkg-multimedia-commits mailing list