#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/buildflags.mk

ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
export CONFIGURE_FLAGS := -DENABLE_TESTS=OFF
endif

export HOME=$(CURDIR)/debian/test-home

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_auto_test:
	mkdir -p $(HOME)
	dh_auto_test

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(HOME)

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