#!/usr/bin/make -f

include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

# needed with the Ubuntu toolchain to avoid issues
export DEB_LDFLAGS_MAINT_STRIP := -Wl,-Bsymbolic-functions
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

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

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		-Denable-gtk-doc=true \
		-Denable-icon-update=true \
		-Denable-introspection=true

override_dh_install:
	dh_install --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -V -- -c4

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

override_dh_translations:
	ninja -C obj-$(DEB_HOST_GNU_TYPE) gnome-bluetooth2-pot
	dh_translations
