#!/usr/bin/make -f

export GO111MODULE=on
export GOFLAGS=-mod=vendor
export GOPROXY=off
export GOSUMDB=off
export GOTOOLCHAIN=local
export CGO_ENABLED=0
export HOME=$(CURDIR)/debian/home
export DH_GOLANG_INSTALL_EXTRA := vendor/modules.txt

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

execute_before_dh_auto_configure:
	rm -rf vendor
	cp -a debian/vendor vendor

override_dh_auto_install:
	dh_auto_install -- --no-source
