#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Get the multiarch triplet
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@ --buildsystem=meson

override_dh_auto_configure:
	dh_auto_configure -- \
		--prefix=/usr \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		-Ddbus=enabled

override_dh_auto_install:
	dh_auto_install
	# Move the entire directory to debian/tmp to preserve structure
	mv debian/xfce4-applemenu-plugin debian/tmp
	# Remove libtool files if any
	find debian/tmp -name '*.la' -delete

override_dh_missing:
	dh_missing --fail-missing
