Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # Don't use "cmd", as it will match "lintcmd".
4 export DH_GOLANG_EXCLUDES := website internal/cmd internal/gosmith \
5 cmd/unused \
6 cmd/keyify cmd/structlayout cmd/structlayout-optimize cmd/structlayout-pretty
7
8 %:
9 dh $@ --builddirectory=_build --buildsystem=golang --with=golang
10
11 ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
12 override_dh_auto_test:
13 # run out of memory: cannot allocate 4194304-byte block (3459678208 in use)
14 -dh_auto_test
15 endif
16
17 # The build has a timeout on slow archs, so increase limit.
18 override_dh_auto_test:
19 dh_auto_test -- -timeout=20m
20
21 execute_after_dh_auto_build:
22 mv _build/bin/staticcheck _build/bin/go-staticcheck
23
24 # Make sure to use the local copy of deprecated expect module
25 execute_before_dh_auto_configure:
26 for i in $$(find -name "*.go"); do \
27 sed -i -e "s,golang.org/x/tools/go/expect,honnef.co/go/tools/golang-x-tools/expect," $$i; \
28 done