#!/usr/bin/make -f
export DPKG_GENSYMBOLS_CHECK_LEVEL=4
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --with kf5,pkgkde_symbolshelper,sodeps --buildsystem kf5 --without build_stamp

execute_before_dh_auto_configure:
	# Ensure the repacked archive has the required files
	test -f src/cities1000.zip

override_dh_auto_configure:
	# needed to get package building reproducibly
	# taken from https://tests.reproducible-builds.org/debian/issues/unstable/cmake_rpath_contains_build_path_issue.html
	dh_auto_configure -- -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	xvfb-run -a dh_auto_test
endif
