#!/usr/bin/make -f

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

# menu-cache does not build (yet) with hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=-all

%:
	dh ${@} --with autotools_dev

override_dh_auto_configure:
	dh_auto_configure -- --libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)/libmenu-cache2/libexec --enable-gtk-doc

override_dh_auto_install:
	dh_auto_install

	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.a

override_dh_builddeb:
	dh_builddeb -- -Zxz -z9

override_dh_install:
	dh_install --fail-missing

override_dh_strip:
	dh_strip -plibmenu-cache2 --dbg-package=libmenu-cache-dbg
	dh_strip -Nlibmenu-cache2
