#!/usr/bin/make -f

#export DH_GOLANG_INSTALL_ALL := 1
export DH_GOLANG_INSTALL_EXTRA = testdata
export DH_GOLANG_EXCLUDES := internal/redis internal/artifacts

%:
	dh $@ --buildsystem=golang --with=golang --builddirectory=_build

override_dh_clean:
	dh_clean
	## Remove Files-Excluded (when built from checkout or non-DFSG tarball):
	$(RM) -rv `perl -0nE 'say $$1 if m{^Files\-Excluded\:\s*(.*?)(?:\n\n|Files:|Comment:)}sm;' debian/copyright`
	-find vendor -type d -empty -delete -print

override_dh_auto_test:
	PATH="$(CURDIR)/_build/bin:$$PATH" dh_auto_test
