#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh ${@} --with autoreconf --parallel

override_dh_auto_configure:
	dh_auto_configure -- --enable-gtk-doc --disable-silent-rules --libexecdir=/usr/lib

override_dh_auto_install:
	dh_auto_install
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la

override_dh_install:
	dh_install --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_strip:
	dh_strip -plibmenu-cache3 --dbg-package=libmenu-cache-dbg
	dh_strip -plibmenu-cache-bin --dbg-package=libmenu-cache-bin-dbg

override_dh_autoreconf_clean:
	dh_autoreconf_clean
	rm -f docs/reference/libmenu-cache/libmenu-cache-docs.sgml
	rm -f docs/reference/libmenu-cache/libmenu-cache-sections.txt
