Skip to content

Commit

Permalink
Support versioning out of git tree in debuild
Browse files Browse the repository at this point in the history
This adds support for properly tagging the build when cmake is run not
in a git tree, which is the case when building from src-deb.

Signed-off-by: Brenden Blanco <[email protected]>
  • Loading branch information
Brenden Blanco committed Aug 26, 2015
1 parent bd8fea4 commit 9e5c352
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEBIAN_VERSION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: (.*),\1,p")
DEBIAN_REVISION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: ([0-9.]+)(~|-)(.*),\3,p")
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: ([0-9.]+)(~|-)(.*),\1,p")

%:
dh $@ --buildsystem=cmake --parallel

override_dh_auto_configure:
dh_auto_configure -- -DREVISION=$(UPSTREAM_VERSION)

0 comments on commit 9e5c352

Please sign in to comment.