#!/usr/bin/make -f

export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_NAMESPACE_ZERO=FULL -DUA_ENABLE_AMALGAMATION=OFF -DUA_PACK_DEBIAN=ON

override_dh_auto_test:
	dh_auto_test -- ARGS+=--output-on-failure

override_dh_auto_build:
	dh_auto_build -- -j`nproc --ignore=2`
	make -C obj-${DEB_HOST_GNU_TYPE} doc doc_pdf

override_dh_install:
	dh_install
	dh_sphinxdoc -X_sources

%:
	dh $@ --buildsystem=cmake --parallel