#!/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

CONFFLAGS = --libexecdir=/usr/lib -Dgtk_doc=true

# https://github.com/ebassi/graphene/issues/95
# https://github.com/ebassi/graphene/issues/97
ifneq (,$(filter $(DEB_BUILD_ARCH),i386))
CONFFLAGS += -Dsse2=false
else ifneq (,$(filter $(DEB_BUILD_ARCH),armhf))
CONFFLAGS +=  -Darm_neon=false
endif

%:
	dh $@ --with gir,gnome

override_dh_auto_configure:
	dh_auto_configure -- $(CONFFLAGS)

override_dh_missing:
	dh_missing --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -- -c4
