#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	 \
	dh_auto_test -- --before-test="ln -s $(CURDIR)/tests/cut {build_dir}/tests && ln -s $(CURDIR)/tests/data {build_dir}/tests"
endif

override_dh_install:
	dh_install
	find debian -type d -name __pycache__ | xargs rm -rf
	find debian -type d -name tests       | xargs rm -rf
	find debian -type f -name .adapters -delete
