#!/usr/bin/make -f

TYPELIBDIR=$(shell pkg-config gobject-introspection-1.0 --variable libdir | sed -e 's/.//')

DHFLAGS=--parallel

%:
	dh $@ $(DHFLAGS)

override_dh_install:
	rm -rfv debian/tmp/usr/lib/*/*.la 
	sed 's@TYPELIBDIR@${TYPELIBDIR}@' debian/gir1.2-mate-polkit.install.in > debian/gir1.2-mate-polkit.install
	dh_install --fail-missing

override_dh_auto_configure:
	NOCONFIGURE=1 ./autogen.sh
	dh_auto_configure $(DHFLAGS) -- \
		--localstatedir=/var \
		--disable-static \
		--with-gtk=2.0

override_dh_strip:
	dh_strip --dbg-package=libpolkit-gtk-mate-1-0-dbg

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
