#!/usr/bin/make -f

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

%:
	dh $@  --with gnome,gir

override_dh_auto_configure:
	dh_auto_configure -- --enable-gtk-doc --enable-gtk-doc-html --enable-vala

override_dh_auto_test:
ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
	dbus-run-session -- xvfb-run dh_auto_test
endif

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_install:
	find debian/ -name '*.la' -print -delete
	rm -f debian/tmp/usr/bin/gspell-app1
	dh_install

override_dh_missing:
	dh_missing --fail-missing
