#!/usr/bin/make -f

#export DH_VERBOSE := 1
# Disable conformance due to it requires with Bazel workspace, and not to vendoring it due to out of previous discussion.
export DH_GOLANG_EXCLUDES := examples codelab repl/main conformance
export DH_GOLANG_INSTALL_EXTRA := cel/templates/authoring.tmpl

export BUILDDIR := build

%:
	dh $@ --builddirectory=$(BUILDDIR)

override_dh_install:
	find debian/golang-cel-cel-go-dev/usr/share/gocode/src/cel.dev/cel-go/ \
	    -type f -exec chmod -x \{\} \;
	dh_install -i

override_dh_auto_test:
	# Allow tests failed on 32bits DEB_HOST_ARCH_BITS
ifeq ($(DEB_HOST_ARCH_BITS),32)
	dh_auto_test -- -short || true
else
	# Disable flaky tests #1146551
	dh_auto_test -- -short -skip="\
	TestContextEval|\
	TestInterpreter_InterruptableEval|\
	"
endif


