#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DH_VERBOSE := 3
export DH_GOLANG_INSTALL_ALL := 1

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

# Instead of using DH_GOLANG_GO_GENERATE which builds everything, even
# under vendor/ (and fails for github.com/jmank88/nuts), only generate
# code for the dep package.
override_dh_auto_build:
	GOPATH=$(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE) go generate github.com/golang/dep
	dh_auto_build

override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install -- --no-source
	rm -f debian/go-dep/usr/bin/licenseok
