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
|
include /usr/share/dpkg/pkg-info.mk
export VERSION := $(shell echo $(DEB_VERSION) | cut -d'-' -f1)
export DH_GOLANG_INSTALL_EXTRA := runtime/colorschemes runtime/help runtime/plugins runtime/syntax
export DH_GOLANG_BUILDPKG := github.com/zyedidia/micro/cmd/micro
%:
dh $@ --buildsystem=golang --with=golang
override_dh_auto_build:
cd obj-$(DEB_BUILD_GNU_TYPE) && GOCACHE=/tmp/gocache GO111MODULE=off GOPATH=$$(pwd) go generate github.com/zyedidia/micro/runtime && cd ..
dh_auto_build -- -buildmode=pie \
-ldflags="-extldflags -Wl,-z,now -s -w -X 'github.com/zyedidia/micro/internal/util.Version=$(VERSION)'"
override_dh_auto_install:
dh_auto_install -- --no-source
|