1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/usr/bin/make -f
# Export DEB_VERSION
include /usr/share/dpkg/pkg-info.mk
export DH_GOLANG_EXCLUDES := file
export VERSION := $(shell echo $(DEB_VERSION) | cut -d'-' -f1)
%:
dh $@ --builddirectory=_build --buildsystem=golang --with=golang
override_dh_auto_build:
dh_auto_build -- \
-ldflags="-extldflags -Wl,-z,now -s -w \
-X 'github.com/kong/deck/cmd.VERSION=$(VERSION)'"
override_dh_auto_install:
dh_auto_install -- --no-source
override_dh_installman:
help2man --no-info --version-string=$(VERSION) \
-n "Configuration management for Kong and Kong Enterprise" \
debian/deck/usr/bin/deck > debian/deck.1
dh_installman
override_dh_auto_clean:
rm -f debian/deck.1
dh_auto_clean
|