#!/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,-O1 -Wl,--as-needed

# https://github.com/ebassi/graphene/issues/95
# https://github.com/ebassi/graphene/issues/97
ifneq (,$(filter $(DEB_BUILD_ARCH),i386))
SSE2 = --disable-sse2
else ifneq (,$(filter $(DEB_BUILD_ARCH),armhf))
NEON = --disable-arm-neon
endif

%:
	dh $@ --with gir,gnome

override_dh_auto_configure:
	dh_auto_configure -- --enable-gtk-doc $(SSE2) $(NEON)

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_install:
	find debian/tmp -name '*.la' -delete
	dh_install --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -V -- -c4
