#!/usr/bin/make -f

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

ifeq (,$(findstring $(DEB_HOST_ARCH), amd64 arm64 armel armhf hppa i386 ia64 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sh4))
	BUILD_UNWIND += -Dlibunwind_optional=true
endif

%:
	dh $@ --buildsystem=meson

override_dh_auto_configure:
	dh_auto_configure -- $(BUILD_UNWIND)

override_dh_auto_test:
	xvfb-run -a dh_auto_test
