#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/architecture.mk
WAF = python3 ./waf

%:
	dh $@

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

execute_before_dh_auto_build:
	@echo "blhc: ignore-line-regexp: C\+\+ .*"
	@echo "blhc: ignore-line-regexp: ^\[[ 0-9]+/[ 0-9]+\] Compiling .*"

override_dh_auto_build:
	$(WAF) --verbose

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

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

override_dh_installchangelogs:
	dh_installchangelogs NEWS
