#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export PYBUILD_NAME = reprozip
export PYBUILD_TEST_ARGS = {dir}/debian/tests
export PYBUILD_AFTER_INSTALL = rm -rf {destdir}/usr/bin

%:
	dh $@ --buildsystem=pybuild

# The prebuilt binary was introduced since 1.2, see:
# https://salsa.debian.org/science-team/reprozip/-/tree/upstream/native?ref_type=heads
override_dh_auto_clean:
	rm -f ${CURDIR}/native/log.o
	dh_auto_clean

execute_after_dh_auto_install:
	python3 setup.py install_scripts --skip-build \
		--install-dir=debian/$(PYBUILD_NAME)/usr/bin
