#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DENABLE_WERROR=OFF		\
	                     $(NULL)

override_dh_missing:
	dh_missing --fail-missing

override_dh_auto_test:
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	export HOME=$(CURDIR)/debian/home &&    \
	    mkdir -p $${HOME} &&       \
	    CTEST_OUTPUT_ON_FAILURE=1 make -j1 -C obj-$(DEB_HOST_GNU_TYPE) test
endif
endif

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
