diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2013-09-09 18:06:45 +0100 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2013-09-09 18:06:45 +0100 |
commit | 02ed24d351bff14e9ebdbea17ccbac0ce5be5a1a (patch) | |
tree | 3ca29f952f25e31d278206fc0e63df7e058080ae /debian/rules | |
parent | 6acef73052a6d394372b15056d36282df9df2b45 (diff) | |
download | dnsmasq-02ed24d351bff14e9ebdbea17ccbac0ce5be5a1a.tar.gz |
Add gitversion Debian build option.v2.67test12
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules index e658683..4ad2dd8 100755 --- a/debian/rules +++ b/debian/rules @@ -23,6 +23,11 @@ TARGET = install-i18n DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +# Force package version based on git tags. +ifneq (,$(filter gitversion,$(DEB_BUILD_OPTIONS))) + PACKAGE_VERSION = $(shell bld/get-version `pwd` | sed 's/[a-z]/~&/; s/$$/-1/; s/^/-v/') +endif + ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS))) COPTS += -DHAVE_DBUS endif @@ -103,7 +108,7 @@ binary-indep: checkroot install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq ln -s $(package) debian/daemon/usr/share/doc/dnsmasq cd debian/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums - dpkg-gencontrol -pdnsmasq -Pdebian/daemon + dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq -Pdebian/daemon chown -R root.root debian/daemon chmod -R g-ws debian/daemon dpkg --build debian/daemon .. @@ -151,7 +156,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) endif cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums dpkg-shlibdeps debian/base/usr/sbin/dnsmasq - dpkg-gencontrol -pdnsmasq-base -Pdebian/base + dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/base chown -R root.root debian/base chmod -R g-ws debian/base dpkg --build debian/base .. @@ -178,7 +183,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) endif cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums dpkg-shlibdeps -Tdebian/utils-substvars debian/utils/usr/bin/dhcp_release debian/utils/usr/bin/dhcp_lease_time - dpkg-gencontrol -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils + dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils chown -R root.root debian/utils chmod -R g-ws debian/utils dpkg --build debian/utils .. |