#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

NO_PIE_ARCHS := mips64el mipsel riscv64

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

override_dh_auto_build:
	dh_auto_build -- $(if $(filter $(DEB_HOST_ARCH),$(NO_PIE_ARCHS)),,-buildmode=pie)

override_dh_auto_install:
	dh_auto_install -- --no-source
