#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PHOG_DESTDIR = debian/tmp

%:
	dh $@ --builddirectory=_build

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	LC_ALL=C.UTF-8 xvfb-run -a meson test -C _build
endif

override_dh_auto_install:
	# dh_auto_install will put files in debian/<PACKAGE>, while dh_install
	# will look in debian/tmp. Make sure both use the same directory.
	dh_auto_install --destdir=$(PHOG_DESTDIR)
