#!/usr/bin/make -f

-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

%:
	dh $@ --with gnome,gir

# simplified from autogen.sh
override_dh_autoreconf:
	dh_autoreconf sh -- -c "AUTOPOINT='intltoolize --automake --copy' autoreconf"

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=\$${prefix}/lib/gnome-contacts

# build from vala source
override_dh_auto_clean:
	rm -f src/*vala.stamp
	dh_auto_clean

override_dh_installdocs:
	dh_installdocs
	appstream-util appdata-to-news data/org.gnome.Contacts.appdata.xml > debian/gnome-contacts/usr/share/doc/gnome-contacts/NEWS
