[med-svn] r13266 - trunk/package_template
Andreas Tille
tille at alioth.debian.org
Fri Apr 5 09:20:27 UTC 2013
Author: tille
Date: 2013-04-05 09:20:27 +0000 (Fri, 05 Apr 2013)
New Revision: 13266
Modified:
trunk/package_template/rules
Log:
Some rules for assigning helpful variables
Modified: trunk/package_template/rules
===================================================================
--- trunk/package_template/rules 2013-04-05 01:39:56 UTC (rev 13265)
+++ trunk/package_template/rules 2013-04-05 09:20:27 UTC (rev 13266)
@@ -2,6 +2,15 @@
# DH_VERBOSE := 1
+# some helpful variables
+# shamelessly stolen from http://jmtd.net/log/awk/
+DEBVERS := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
+DEBFLAVOR := $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}')
+DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+DEBIAN_BRANCH := $(shell awk 'BEGIN{FS="[= ]+"} /debian-branch/ {print $$2}' debian/gbp.conf)
+GIT_TAG := $(subst ~,_,$(VERSION))
+
%:
dh $@
More information about the debian-med-commit
mailing list