1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#!/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
|