#!/usr/bin/make -f

export DH_GOLANG_EXCLUDES := cmd

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

# dh-golang won't create links for v2 module in GOPATH mode
execute_before_dh_auto_build:
	ln -s /usr/share/gocode/src/github.com/anacrolix/missinggo/v2 _build/src/github.com/anacrolix/missinggo/v2

override_dh_auto_test:
ifeq ($(DEB_HOST_ARCH_BITS),32)
	echo "Skipping test suite on 32-bit architectures to fix FTBFS."
else
	dh_auto_test -- -skip TestTimerDrain
endif
