#!/usr/bin/make -f
include /usr/share/dpkg/buildopts.mk
include /usr/share/dpkg/pkg-info.mk
#export DH_VERBOSE=1

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

export DEB_CXXFLAGS_MAINT_APPEND = -Wall -DNDEBUG

%:
	dh $@ --buildsystem=cmake

# Don't install the bundled fonts: On debian there is a package for them, instead,
CONF_FLAGS= \
	-DWXM_INCLUDE_FONTS=OFF

override_dh_auto_configure:
	dh_auto_configure -- $(CONF_FLAGS)

override_dh_auto_build-arch:
	dh_auto_build -a -- all

override_dh_auto_build-indep:
	dh_auto_build -i -- html pdf

override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	xvfb-run make test
endif

override_dh_auto_test-indep:

override_dh_auto_install-arch:
	dh_auto_install -a

override_dh_auto_install-indep:
	dh_auto_install -i -- -C info

override_dh_installexamples-indep:
	dh_installexamples -XCMakeLists.txt -XREADME.md

## eos
