#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4

%:
	dh $@

override_dh_auto_clean:
	rm -f subprojects/munit

override_dh_auto_configure:
	ln -s ../munit subprojects/
	dh_auto_configure -- \
		-Dauto_features=enabled \
		-Dsd-bus-provider=libsystemd

override_dh_missing:
	dh_missing -Xusr/bin/ei-debug-events

# Ignore s390x test failures since it's not a Desktop architecture
# https://gitlab.freedesktop.org/libinput/libei/-/issues/41
override_dh_auto_test:
ifneq (,$(filter armel s390x,$(DEB_HOST_ARCH)))
	dh_auto_test || true
else
	dh_auto_test
endif
