#!/usr/bin/make -f

# DH_VERBOSE := 1

DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --sourcedirectory=src --with python3

override_dh_auto_clean:
	dh_auto_clean
	find . -type f -name "*.P" -delete

override_dh_install:
	dh_install
	for tool in tools/* ; do \
	    cp -a $${tool} debian/$(DEBPKGNAME)/usr/bin/`basename $${tool} .py` ; \
	done
