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

%:
	dh $@ --with kf6,pkgkde_symbolshelper,sodeps --buildsystem kf6

execute_before_dh_auto_configure:
	# src/CMakeLists.txt expects to find these files, otherwise it will try to download
	# them from download.geonames.org, then let's use the ones that upstream has
	# included inside the flatpak/ folder
	cp -f flatpak/admin1CodesASCII.txt src/
	cp -f flatpak/admin2Codes.txt src/
	cp -f flatpak/cities1000.zip src/

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