#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
export DH_GOLANG_EXCLUDES := example internal/cmd/extract internal/cmd/genop _test

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

override_dh_auto_build:
	dh_auto_build -O--buildsystem=golang -- -ldflags="-extldflags -Wl,-z,now -s -w -X 'main.version=$(DEB_VERSION_UPSTREAM)'"

override_dh_auto_test:
	# The default timeout for tests is 10m, which is not enough for
	# slower or overloaded machines. Let's increase it to one hour.
	dh_auto_test -- -timeout 1h
