Sunil Mohan Adapa 2788d6810d
Makefile: Move various tests into build system
- This allows those tests to be invoked on console and not just in CI pipelines.

Tests:

- Running make check works.

- CI pipeline succeeds.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Remove phony test target]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-12 19:17:16 -05:00

29 lines
1.1 KiB
Makefile
Executable File

#!/usr/bin/make -f
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
%:
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
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
# (as of debhelper 13.5.2) that still has hardcoded search path of
# /lib/systemd/system for searching systemd services. See #987989 and
# reversion of its changes.
dh_installsystemd --tmpdir=debian/tmp/usr --package=freedombox plinth.service