#!/usr/bin/make -f

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

GNOME_MODULE := gnome-desktop

LIB_PKG := $(filter-out %-dev %-dbg %-bin,$(filter lib%,$(shell dh_listpackages)))

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

%:
	dh $@ --with gnome,gir

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=\$${libdir}/$(LIB_PKG) \
		--with-gnome-distributor=$(shell dpkg-vendor --query vendor) \
		--disable-date-in-gnome-version \
		--enable-gtk-doc \
		--enable-desktop-docs \
		--enable-introspection

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

override_dh_install:
	dh_install --list-missing
