#!/usr/bin/make -f

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

libtotem-plparserN := $(shell sed -rn 's/^Package:[[:space:]]*(libtotem-plparser[0-9]+)[[:space:]]*$$/\1/p' debian/control)

# https://lists.debian.org/debian-devel/2017/09/msg00006.html
# https://github.com/mesonbuild/meson/issues/2268
export LC_ALL=C.UTF-8

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

override_dh_auto_configure:
	dh_auto_configure -- \
		--libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/$(libtotem-plparserN) \
		-Denable-gtk-doc=true \
		-Denable-libarchive=yes \
		-Denable-libgcrypt=yes \
		-Denable-quvi=yes

override_dh_makeshlibs:
	dh_makeshlibs -p $(libtotem-plparserN) -V -- -c4
	dh_makeshlibs --remaining-packages

override_dh_strip:
	dh_strip --dbgsym-migration="libtotem-plparser-dbg (<< 3.10.6-5~)"

override_dh_auto_test:
	dh_auto_test || true
