Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # Export DEB_VERSION
4 include /usr/share/dpkg/pkg-info.mk
5
6 # Linker variables from upstream (micro) Makefile
7 export VERSION := $(shell echo $(DEB_VERSION) | cut -d'-' -f1)
8
9 # Extra plugins that need installation
10 export DH_GOLANG_INSTALL_EXTRA := runtime/colorschemes runtime/help runtime/plugins runtime/syntax
11
12 # Define build target
13 export DH_GOLANG_BUILDPKG := github.com/zyedidia/micro/v2/cmd/micro
14
15 %:
16 dh $@ --buildsystem=golang --with=golang
17
18 execute_before_dh_auto_configure:
19 cp -av $(CURDIR)/debian/vendor $(CURDIR)
20
21 override_dh_clean:
22 dh_clean
23 rm -fr vendor/
24
25 override_dh_auto_build:
26 cd obj-$(DEB_BUILD_GNU_TYPE) && GOCACHE=/tmp/gocache GO111MODULE=off GOPATH=$$(pwd) go generate github.com/zyedidia/micro/v2/runtime && cd ..
27 dh_auto_build -- -buildmode=pie \
28 -ldflags="-extldflags -Wl,-z,now -s -w -X 'github.com/zyedidia/micro/v2/internal/util.Version=$(VERSION)'"
29 # Adding CompileDate is bad reproducibility and
30 # adding CommitHash is redundant as we don't use that to build a package.
31
32 override_dh_auto_install:
33 dh_auto_install -- --no-source