#!/usr/bin/make -f

export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# this package requires an insane amount of memory to build, even
# more than 12 GB per thread.  This means that an hypothetical build
# with parallel=4 can require even 48 GB (more likely 60…) of RAM!  Not
# to say, when this starts swapping things get ugly...
# Therefor, --no-parallel
%:
	dh $@ --no-parallel --buildsystem=cmake

# disable DOXYGEN, https://github.com/feelpp/feelpp/issues/738
override_dh_auto_configure:
	dh_auto_configure -O--buildsystem=cmake --  \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo       \
		-DPETSC_EXECUTABLE_RUNS=ON              \
		-DBUILD_TESTING=ON                      \
		-DFEELPP_ENABLE_DOXYGEN=OFF             \
		-DFEELPP_ENABLE_DOCUMENTATION=ON        \
		-DFEELPP_MINIMAL_CONFIGURATION=ON       \

override_dh_auto_test:
	@# Tests skipped.

override_dh_compress:
	dh_compress -X.pdf
