#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LDFLAGS+=-Wl,--as-needed
WAF = ./waf

%:
	dh $@

override_dh_auto_configure:
	$(WAF) configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--gtk2-lib-name="libgtk-x11-2.0.so.0" \
                --strict \
		--debug

override_dh_auto_build:
	$(WAF)

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

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

override_dh_strip:
	dh_strip --dbg-package=suil-dbg
