#!/usr/bin/make -f

export LDFLAGS+=-Wl,--as-needed
WAF = ./waf

export REPACK_SH=$(CURDIR)/debian/repack.sh

%:
	dh $@

override_dh_auto_configure:
	$(WAF) configure \
		--prefix=/usr \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--mandir=/usr/share/man \
		--strict \
		--gir \
		--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_shlibdeps:
	dh_shlibdeps
	dh_girepository -l src:debian/libganv-dev/usr/share/gir-1.0

override_dh_installchangelogs:
	dh_installchangelogs NEWS

get-orig-source:
	uscan --force-download
