#!/usr/bin/make -f
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

export DEB_LDFLAGS_MAINT_APPEND := -Wl,-O1 -Wl,-z,defs -Wl,--as-needed
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --with gir,gnome

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=/usr/lib/gcr \
		--enable-gtk-doc \
		--enable-introspection \
		--with-gtk \
		--disable-update-mime \
		--disable-valgrind

override_dh_auto_test:
ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
	# Disable fakeroot as this confuses some of the tests
	env -u LD_PRELOAD dbus-run-session -- make check VERBOSE=1
endif

override_dh_install:
	dh_install --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -V -- -c4
