Sunil Mohan Adapa 1ad48ecad8
d/rules: Drop a workaround for dh_installsytemd needed for /usr/lib
Since debhelper 13.11.6, we don't need this hack as dh_installsystemd recognizes
the files in /usr/lib/systemd/ directory in addition to /lib/systemd/.

Tests:

- After build package with gbp. Notice that postinst script has code inserted by
dh_installsystemd for starting/restarting the service.

- Install the deb package starts service. Reinstalling the package restarts the
service.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-29 16:58:45 +03:00

35 lines
1.2 KiB
Makefile
Executable File

#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export DH_VERBOSE=1
export PYBUILD_DESTDIR=debian/tmp
export PYBUILD_SYSTEM=custom
export PYBUILD_CONFIGURE_ARGS=make configure
export PYBUILD_BUILD_ARGS=make PYTHON={interpreter} build
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
override_dh_auto_install-indep:
dh_auto_install
./run --develop --list-dependencies | sort | tr '\n' ', ' | \
sed -e 's/^/freedombox:Depends=/' >> debian/freedombox.substvars
# 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.
dh_installsystemd --package=freedombox plinth.service \
freedombox-privileged.socket