#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with python3

override_dh_auto_clean:
	:

override_dh_auto_configure:
	python3 waf configure \
		--prefix=/usr \
		--libdir=usr/lib/$(DEB_HOST_MULTIARCH)/

override_dh_auto_build:
	python3 waf
	for PY in $(shell py3versions -rs); do \
		$$PY setup.py build; done

override_dh_auto_install:
	python3 waf install \
		--destdir=$(shell pwd)/debian/tmp/
	for PY in $(shell py3versions -rs); do \
		$$PY setup.py install \
			--install-layout=deb \
			--root=$(shell pwd)/debian/tmp; done
