#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

BUILDDIR = obj-$(DEB_HOST_MULTIARCH)

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -B $(BUILDDIR)-static
	dh_auto_configure -- \
		-DBUILD_SHARED_LIBS=ON

override_dh_auto_build:
	dh_auto_build -B $(BUILDDIR)-static
	dh_auto_build

override_dh_auto_build-indep:
	dh_auto_build -i -- -C doc

override_dh_auto_install:
	dh_auto_install -B $(BUILDDIR)-static
	dh_auto_install

override_dh_auto_install-indep:
	dh_auto_install -i -- -C doc

execute_after_dh_auto_install-arch:
	mkdir -p debian/tmp/usr/share/man	

override_dh_auto_test-arch:
	# drop (fake)root privileges,
	# but still skip running test suite
	# as it is *exhaustive*
	env -u LD_PRELOAD dh_auto_test -a --no-act

override_dh_auto_test-indep:
