debian: Print warning if version mismatch

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2025-07-26 08:45:39 -04:00 committed by Sunil Mohan Adapa
parent 370e3320b5
commit 32fd5048c1
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

9
debian/rules vendored
View File

@ -1,5 +1,7 @@
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export DH_VERBOSE=1
export PYBUILD_DESTDIR=debian/tmp
export PYBUILD_SYSTEM=custom
@ -9,6 +11,8 @@ export PYBUILD_INSTALL_ARGS=make PYTHON={interpreter} DESTDIR={destdir} install
export PYBUILD_CLEAN_ARGS=make clean
export PYBUILD_TEST_ARGS=make PYTHON={interpreter} check-tests
FBX_VERSION := $(shell ./run --develop --version | awk 'NF{ print $$NF }')
%:
dh $@ --with python3 --buildsystem=pybuild
@ -19,6 +23,11 @@ override_dh_auto_install-indep:
# Ensure the list of dependencies is not empty.
test -s debian/freedombox.substvars || exit 1
# Check that FreedomBox version number is matching.
ifneq ($(FBX_VERSION),$(DEB_VERSION))
>&2 echo "WARNING: FreedomBox version $(FBX_VERSION) does not match package version $(DEB_VERSION)."
endif
override_dh_installsystemd:
# Do not enable or start any service other than FreedomBox service. Use
# of --tmpdir is a hack to workaround an issue with dh_installsystemd