#!/usr/bin/make -f
# DH_VERBOSE := 1

CONFIG_FLAGS := --prefix=/usr \
                --buildtype=plain

INSTALL_DIR := $(CURDIR)/debian/tmp
export DFLAGS=-O -g -release

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	mkdir build
	(cd build && meson $(CONFIG_FLAGS) ..)

override_dh_auto_build:
	ninja -Cbuild -v

override_dh_auto_install:
	DESTDIR=$(INSTALL_DIR) ninja -Cbuild -v install

override_dh_install:
	dh_install --list-missing

override_dh_auto_test:
	ninja -Cbuild -v test

override_dh_clean:
	rm -rf build/
	dh_clean
