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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

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

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_QCH=ON
	# ktexteditor embeds underscore.js in the generated lib
	# (through a qt resource)
	-ln -sf /usr/share/javascript/underscore/underscore.js src/script/data/libraries/underscore.js

override_dh_auto_test:
ifeq (,$(filter $(DEB_HOST_ARCH), armhf))
	- xvfb-run -a --server-args="-screen 0 1024x768x24+32" dh_auto_test --no-parallel
endif
