[SCM] sfarkxtc/master: added get-orig-source target

rubund-guest at users.alioth.debian.org rubund-guest at users.alioth.debian.org
Sat Dec 6 13:15:42 UTC 2014


The following commit has been merged in the master branch:
commit 7d85aa401ea649c2b731546e40a5558f724cb71d
Author: Ruben Undheim <ruben.undheim at gmail.com>
Date:   Sat Dec 6 14:15:25 2014 +0100

    added get-orig-source target

diff --git a/debian/rules b/debian/rules
index 5305d25..b9337d9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,3 +9,23 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 %:
 	dh $@ 
 
+
+PKD = $(abspath $(dir $(MAKEFILE_LIST)))
+PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
+VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
+
+get-orig-source: $(PKG)_$(VER).orig.tar.gz $(info I: $(PKG)_$(VER))
+	@
+
+$(PKG)_$(VER).orig.tar.gz:
+	@echo "# Downloading..."
+	rm -rf $(PKG)-$(VER)
+	git clone git://github.com/raboof/sfarkxtc.git $(PKG)-$(VER)
+	cd $(PKG)-$(VER) \
+	&& git checkout `echo $(VER) | perl -pe 's/[\d\.]+?[\+~]\d\d\d\d\d\d\d\dgit(\w\w\w\w\w\w\w)/\1/'` \
+	&& $(RM) -rf .git
+	@echo "# Packing..."
+	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
+	| tar -czvf "$(PKG)_$(VER).orig.tar.gz" -T- --owner=root --group=root --mode=a+rX \
+	&& $(RM) -rf "$(PKG)-$(VER)"
+	

-- 
sfarkxtc packaging



More information about the pkg-multimedia-commits mailing list