#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

# The archived templates are experimental and php-mustache does not use
# them. On armhf two serializations of the same template differ (the
# "cista_archive" test fails). Without them the bundled Cista and xxHash
# headers are not compiled either.
override_dh_auto_configure:
	dh_auto_configure -- \
		-DMUSTACHE_BUILD_CLI=OFF \
		-DMUSTACHE_ENABLE_ARCHIVED_TEMPLATES=OFF \
		-DMUSTACHE_ENABLE_JSON=ON \
		-DMUSTACHE_ENABLE_YAML=ON

override_dh_makeshlibs:
	dh_makeshlibs -V

override_dh_auto_test:
	# the "spec" test needs the mustache/spec submodule, which the release
	# archive does not include
	dh_auto_test -- ARGS+=-E ARGS+='^spec$$'
