#! /usr/bin/make -f
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

GNOME_MODULE := atk

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

%:
	dh $@ --with gir,gnome --buildsystem=meson

override_dh_auto_configure:
	dh_auto_configure -- \
		-Denable_docs=true \
		-Ddisable_introspection=false

override_dh_makeshlibs:
	dh_makeshlibs -plibatk1.0-0 \
		--add-udeb="libatk1.0-udeb" -V -- -c4

override_dh_install:
	find debian \( -name '*.a' -o -name '*.la' \) -print -delete
	dh_install

override_dh_missing:
	dh_missing --fail-missing

override_dh_strip:
	dh_strip --dbgsym-migration='libatk1.0-dbg (<< 2.21.90-1~)'

# Needed by Ubuntu
override_dh_translations:
	ninja -C obj-$(DEB_HOST_GNU_TYPE) atk10-pot
	dh_translations

override_dh_auto_clean:
	dh_auto_clean
	rm -f po/atk10.pot
