#!/usr/bin/make -f

%:
	dh $@ --with python3

override_dh_auto_configure:
	dh_auto_configure -- \
		-DDEFAULT_PRELOAD_FILE="/usr/\$${LIB}/bear/libear.so" \
		-DPYTHON_EXECUTABLE=/usr/bin/python3

override_dh_auto_test:
	# The tests fail if /usr/lib/ccache is in PATH so we remove it here. The tests
	# do not fail if CC or CXX are set to use ccache.
	PATH=$(shell echo $$PATH | \
		sed -e 's;:/usr/lib/ccache/\?;;' \
			-e 's;^/usr/lib/ccache/\?;;') \
		dh_auto_test

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog.md
