#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_CXXFLAGS_MAINT_APPEND=-I/usr/include/fastahack

# testsuite assumes binaries to be tested are under build/
%:
	dh $@ --buildsystem=meson --builddir=build

execute_before_dh_auto_configure:
	cp -a debian/ext/* contrib/

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p test/bash-tap/
	ln -s -t test/bash-tap $(CURDIR)/debian/bash-tap/*
	mkdir -p test/test-simple-bash
	ln -s -t test/test-simple-bash $(CURDIR)/debian/test-simple-bash/*

	dh_auto_test -- -v --timeout-multiplier 100
	find . -name core -delete

	rm -Rf test/bash-tap
	rm -Rf test/test-simple-bash
endif
