#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA := $(shell find . -name test-fixtures) \
                                  $(wildcard builder/azure/common/template/*approved*) \
                                  $(wildcard builder/azure/arm/*approved*)
export DH_GOLANG_EXCLUDES := plugin/example scripts \
                             builder/azure builder/ncloud builder/oneandone builder/oracle \
                             builder/profitbricks builder/scaleway builder/triton \
                             builder/tencentcloud builder/hcloud
export HOME := $(shell mktemp -d)

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

override_dh_auto_configure:
	cp -rvT debian/vendor ./vendor
ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
	# mips mipsel are too slow to run these tests
	rm -v builder/googlecompute/step_create_windows_password_test.go
endif
	dh_auto_configure

override_dh_auto_install:
	dh_auto_install -- --no-source
