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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,--as-needed

%:
	dh $@ --with gnome,gir

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-pixbuf-loader \
		--enable-introspection \
		--enable-vala \
		--enable-gtk-doc

override_dh_makeshlibs:
	dh_makeshlibs -V -- -c4

override_dh_install:
	find debian/tmp -name '*.a' -print -delete
	find debian/tmp -name '*.la' -print -delete
	dh_install
	sed -e "s/#MULTIARCH#/$(DEB_HOST_MULTIARCH)/g" debian/librsvg2-common.postinst.in > \
		debian/librsvg2-common.postinst

override_dh_missing:
	dh_missing --fail-missing

override_dh_clean:
	dh_clean
	rm -f debian/librsvg2-common.postinst

# Skip some tests that are known to fail but don't seem release-critical
export DEB_BUILD_TIME_TESTS = 1
