#!/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 gir,gnome --without autoreconf

override_dh_missing:
	dh_missing --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

CHECK_HOME = $(CURDIR)/debian/tmp/home

override_dh_auto_test:
ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
	mkdir -p $(CHECK_HOME)
	env XDG_RUNTIME_DIR=$(CHECK_HOME) $(MAKE) check VERBOSE=1 || true
endif
