[SCM] sfarklib/master: Added get-orig-source target
rubund-guest at users.alioth.debian.org
rubund-guest at users.alioth.debian.org
Sat Dec 6 13:12:38 UTC 2014
The following commit has been merged in the master branch:
commit 96eef0b68d834312504505747e640a0a02bee28b
Author: Ruben Undheim <ruben.undheim at gmail.com>
Date: Sat Dec 6 14:12:12 2014 +0100
Added get-orig-source target
diff --git a/debian/rules b/debian/rules
index 7b0a4e0..9896775 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,3 +11,24 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
override_dh_strip:
dh_strip -plibsfark0 --keep-debug --dbg-package=libsfark0-dbg
+
+
+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/sfArkLib.git $(PKG)-$(VER)
+ cd $(PKG)-$(VER) \
+ && git checkout `echo $(VER) | perl -pe 's/\d+?\.\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)"
+
--
sfarklib packaging
More information about the pkg-multimedia-commits
mailing list