From afe4512f30445354940a27a6a9706f4dce726ad3 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 27 May 2023 17:43:20 +0200 Subject: [PATCH] d/rules: enforce that the debian package version mateches cargo one Signed-off-by: Thomas Lamprecht --- debian/rules | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/rules b/debian/rules index e3b4e60..44aaeb4 100755 --- a/debian/rules +++ b/debian/rules @@ -3,11 +3,18 @@ # output every command that modifies files on the build system. #DH_VERBOSE = 1 +include /usr/share/dpkg/pkg-info.mk + export BUILD_MODE=skip %: dh $@ +override_dh_auto_configure: + @perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \ + die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml + dh_auto_configure + override_dh_strip: dh_strip debian/scripts/elf-strip-unused-dependencies.sh \