#!/usr/bin/make -f

export DH_VERBOSE=1
export DH_OPTIONS=-v
export PETSC_DIR=/usr/lib/petsc
export PYBUILD_SYSTEM=pyproject
export PYBUILD_NAME=damask

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
	dh $@               -Ndamask-mesh -Npython3-damask -Ndamask --buildsystem=cmake --builddir=build-grid --without build-stamp
	dh $@ -Ndamask-grid               -Npython3-damask -Ndamask --buildsystem=cmake --builddir=build-mesh --without build-stamp
	dh $@ -Ndamask-grid -Ndamask-mesh                  -Ndamask --buildsystem=pybuild --with python3 --sourcedir=python
	dh $@ -Ndamask-grid -Ndamask-mesh -Npython3-damask

override_dh_auto_configure-arch:
	dh_auto_configure -Ndamask-mesh -Npython3-damask -Ndamask -- -DDAMASK_SOLVER=GRID -DCMAKE_BUILD_TYPE=RELEASE
	dh_auto_configure -Ndamask-grid -Npython3-damask -Ndamask -- -DDAMASK_SOLVER=MESH -DCMAKE_BUILD_TYPE=RELEASE

override_dh_auto_test:
	
