#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
WAF = python3 ./waf

%:
	dh $@

override_dh_auto_configure:
	$(WAF) configure \
		--prefix=/usr \
		--debug

override_dh_auto_build:
	$(WAF)

override_dh_auto_clean:
	$(WAF) clean || true
	find -name "*.pyc" -delete
	rm -rf build
	dh_auto_clean

override_dh_auto_install:
	$(WAF) install --destdir=$(CURDIR)/debian/fomp

override_dh_installchangelogs:
	dh_installchangelogs NEWS
