#! /usr/bin/make -f

include /usr/share/dune/dune-debian.mk
include /usr/share/dune/dune-debian-python.mk

ifneq ("$(DEB_HOST_ARCH_BITS)", "64")
	# exclude test of reading binary gmsh files on non-64 bit machines
	# # Those files are written withe integer size 64bit but implementation
	# # throws because it only allows for reading 32bit integers
	export DUNE_CTEST_OPTIONS=-E "(gmsh4readertest|gmshtest-uggrid)"
endif

override_dh_install:
	# Manual delete runpath set by openmpi 5.0.5
	# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085509
	find debian/tmp/ -name \*.so -o  -name \*.so.\* -exec chrpath -d '{}' \; || true
	dh_install

override_dh_auto_test-arch:
	$(DUNE_DEBIAN_AUTO_TEST)

# The indep build only ships the documentation; the tests are run by the
# arch build.
override_dh_auto_test-indep:

%:
	dh $@ --builddirectory=build --buildsystem=cmake
