#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=desec
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYBUILD_TEST_PYTEST=1

%:
	dh $@ --buildsystem=pybuild

# Two files were flagged 'package-contains-ancient-file' by
# lintian. Upstream won't fix this; poetry does this on purpose
# for the sake of reproducible builds. Fixing those two here:

execute_after_dh_compress:
	for file in \
		usr/share/bash-completion/completions/desec.bash \
		usr/share/doc/desec-dns/changelog.gz \
		usr/share/zsh/site-functions/_desec; \
	do \
		touch --no-create --date="@$(SOURCE_DATE_EPOCH)" debian/desec-dns/$$file; \
	done
