diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-12-31 07:32:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-12-31 07:32:06 +0000 |
commit | c6fdcfde17538ea3ef8ffd3003ae780b028bcabb (patch) | |
tree | 705f40f2939c668924b06a09d01dcadec0b48e02 | |
parent | Writing exact package version into web/version.txt. (diff) | |
download | netdata-c6fdcfde17538ea3ef8ffd3003ae780b028bcabb.tar.xz netdata-c6fdcfde17538ea3ef8ffd3003ae780b028bcabb.zip |
Writing exact version number into netdata itself.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-x | debian/rules | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules index 02f2b285..5c321d1f 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,10 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) TOP = $(CURDIR)/debian/netdata VERSION := $(shell dpkg-parsechangelog -SVersion) +VERSION_MAJOR := $(word 1, $(subst ., ,$(VERSION))) +VERSION_MINOR := $(word 2, $(subst ., ,$(VERSION))) +VERSION_FIX := $(word 3, $(subst -, ,$(subst ., ,$(VERSION)))) +VERSION_SUFFIX := -$(word 4, $(subst -, ,$(subst ., ,$(VERSION)))) export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all @@ -18,6 +22,15 @@ MULTIARCH_INSTALL = debian/netdata.postinst %: dh $@ +override_dh_autoreconf: + sed -i -e 's/^\(define(\[VERSION_MAJOR]\).*/\1, [$(VERSION_MAJOR)])/' \ + -e 's/^\(define(\[VERSION_MINOR]\).*/\1, [$(VERSION_MINOR)])/' \ + -e 's/^\(define(\[VERSION_FIX]\).*/\1, [$(VERSION_FIX)])/' \ + -e 's/^\(define(\[VERSION_SUFFIX]\).*/\1, [$(VERSION_SUFFIX)])/' \ + configure.ac + + dh_autoreconf + override_dh_auto_configure: dh_auto_configure -- --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH) --with-math |