aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Luebbe <jluebbe@debian.org>2011-06-09 23:26:52 +0200
committerJan Luebbe <jluebbe@debian.org>2011-07-14 11:14:59 +0200
commit304d1fc8d2dabd14e35776e503954aed73fe43ce (patch)
tree2b5adeca8a73ce38170e7965cf01680910c86223
parent356291c1c7434459a995ff3aac4c1720fa7f24c9 (diff)
Write .tarball-version directly
-rw-r--r--debian/gbp.conf1
-rwxr-xr-xdebian/rules5
2 files changed, 6 insertions, 0 deletions
diff --git a/debian/gbp.conf b/debian/gbp.conf
index f3a20397..79085c52 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -10,6 +10,7 @@ pristine-tar = False
# Options only affecting git-buildpackage
[git-buildpackage]
+prebuild = GIT_DIR=$GBP_GIT_DIR debian/rules tarball-version
export-dir = ../gbp-build-area/
# compress with bzip2
compression = bzip2
diff --git a/debian/rules b/debian/rules
index 15f78f2c..0ba229f3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,9 +11,14 @@
CFLAGS = -Wall -g
+DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
+
%:
dh --with autoreconf $@
#override_dh_strip:
# dh_strip --dbg-package=libosmocore-dbg
+tarball-version:
+ git describe --abbrev=4 --match '*.*.*' $(DEB_UPSTREAM_VERSION) | sed 's/-/./;s/\(.*\)-g/\1-/' > .tarball-version
+