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

# needed with the Ubuntu toolchain to avoid issues
export DEB_LDFLAGS_MAINT_STRIP := -Wl,-Bsymbolic-functions

%:
	dh $@ --with gir,gnome

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dgtk_doc=true \
		-Dicon_update=true \
		-Dintrospection=true

override_dh_missing:
	dh_missing --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

override_dh_girepository:
	dh_girepository -l applet \
		/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-bluetooth/

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

override_dh_auto_clean:
	dh_auto_clean
	rm -f po/gnome-bluetooth2.pot
