#!/usr/bin/make -f
export PYBUILD_NAME=zeroconf

# special build flags for Debian package
export DEBIAN_TEST=1
export SKIP_CYTHON=True

%:
	dh $@ --buildsystem=pybuild

# remove coverage test file from installation tree
execute_after_dh_auto_install:
	rm -fv  debian/python3-zeroconf/usr/lib/python3*/dist-packages/.coverage
	rm -rfv debian/python3-zeroconf/usr/lib/python3*/dist-packages/.benchmarks/

# keep ".md" extension for changelogs
override_dh_installchangelogs:
	dh_installchangelogs --keep

# fix too old timestamps that breaks Debian package
execute_after_dh_installchangelogs:
	touch --no-create --date="@$(SOURCE_DATE_EPOCH)" debian/python3-zeroconf/usr/share/doc/python3-zeroconf/changelog
execute_after_dh_installdocs:
	touch --no-create --date="@$(SOURCE_DATE_EPOCH)" debian/python3-zeroconf/usr/share/doc/python3-zeroconf/README.rst
