#!/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 $@ --parallel --with autoreconf,gnome,gir

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--disable-silent-rules \
		--enable-getting-started

override_dh_install:
	# Since dh_install -X.la isn't working...
	find -name *.la -delete
	dh_install -X.la

override_dh_makeshlibs:
	dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-documents

override_dh_girepository:
	dh_girepository -X/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-documents \
	-ldebian/gnome-documents/usr/share/gnome-documents/gir-1.0 \
	/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-documents/ /usr/lib/$(DEB_HOST_MULTIARCH)/gnome-documents/girepository-1.0/

