diff options
Diffstat (limited to 'debian/rules')
| -rwxr-xr-x | debian/rules | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules index 7341bb15a..69483e5fd 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,11 @@ SERVICES_DIR := usr/libexec/vyos/services DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_TARGET_ARCH) +# Base version prefix from debian/changelog +BASE_VERSION := 999.0 +COMMIT_ID := $(shell echo -n g && git rev-parse --short HEAD) +DIRTY_FLAG := $(shell ! git diff --quiet || ! git diff --cached --quiet && echo -dirty || echo) + %: dh $@ --with python3, --with quilt @@ -27,7 +32,7 @@ DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_TARGET_ARCH) override_dh_strip_nondeterminism: override_dh_gencontrol: - dh_gencontrol -- -v$(shell (git describe --tags --long --match 'vyos/*' --match '1.4.*' --dirty 2>/dev/null || echo 0.0-no.git.tag) | sed -E 's%vyos/%%' | sed -E 's%-dirty%+dirty%') + dh_gencontrol -- -v$(BASE_VERSION)-$(COMMIT_ID)$(DIRTY_FLAG) override_dh_auto_build: make all |
