#!/usr/bin/make -f

# Aim for the top, adapt if anything should break on the buildds.
DEB_BUILD_MAINT_OPTIONS=	hardening=+all future=+lfs
export DEB_BUILD_MAINT_OPTIONS

D=	${CURDIR}/debian
MARCH:=	$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

%:
	dh "$@" --buildsystem cmake

override_dh_auto_configure:
	dh_auto_configure -- -DENABLE_DRPM=ON -DENABLE_PYTHON=ON -DSKBUILD=ON

execute_after_dh_auto_test:
	env PYTHONPATH='obj-${MARCH}/src/python' PATH="${CURDIR}/obj-${MARCH}/src:$$PATH" LD_LIBRARY_PATH='${CURDIR}/obj-${MARCH}/src' python3 -B '$D/tests/repotest.py' --source '$D/tests/pkg/foo-0.1.0' --spec '$D/tests/pkg/foo.spec'

override_dh_makeshlibs:
	dh_makeshlibs -- -c4
