#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk VERSION = $(DEB_VERSION)-debian LDFLAGS := -ldflags="-extldflags -s -w -X main.version=$(VERSION)" ifeq (,$(filter $(DEB_HOST_ARCH), mips mipsel mips64el)) LDFLAGS := -buildmode=pie -ldflags="-extldflags -s -w -X main.version=$(VERSION)" endif %: dh $@ --builddirectory=_build --buildsystem=golang override_dh_auto_build: dh_auto_build -- $(LDFLAGS) override_dh_auto_install: dh_auto_install -- --no-source execute_after_dh_auto_build: make man