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

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

# Skip tests on the archs they are known to be flaky with current configuration
testskip_architectures := powerpc ppc64el

%:
	dh $@ --parallel --fail-missing --with click

override_dh_auto_configure:
	dh_auto_configure -- -DLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) -DCMAKE_INSTALL_LOCALSTATEDIR=/var

# Tests are not written to be run in parallel.
override_dh_auto_test:
ifeq (,$(filter $(testskip_architectures),$(DEB_HOST_ARCH)))
	dh_auto_test --max-parallel=1 -- ARGS="--verbose"
endif

override_dh_click:
	dh_click --name scope

override_dh_auto_clean:
	/bin/sh $(CURDIR)/debian/bileto_pre_release_hook
	dh_auto_clean
