#!/usr/bin/make -f

# Do not install the tool-only binaries (docs, generatetables).
export DH_GOLANG_EXCLUDES := /generatetables$$ warn/docs

%:
	dh $@ --builddirectory=debian/_build --buildsystem=golang --with=single-binary

override_dh_auto_install:
	dh_auto_install -- --no-source

# Tests that rely on Bazel runfiles fail under dh-golang (go test);
# skip them in the test stage only.
override_dh_auto_test:
	DH_GOLANG_EXCLUDES='$(DH_GOLANG_EXCLUDES) /build$$ /tables$$' dh_auto_test
