File: rules

package info (click to toggle)
go-dep 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,200 kB
  • sloc: sh: 234; makefile: 46
file content (30 lines) | stat: -rwxr-xr-x 886 bytes parent folder | download | duplicates (2)
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
29
30
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DH_VERBOSE := 3
export DH_GOLANG_INSTALL_ALL := 1

export GOROOT := $(strip $(or \
	$(if $(findstring $(shell go version | sed -e 's,.* go\(1[.][0-9][0-9]*\)\([.][^ ]*\)\? .*,\1,'),\
			1.9 1.10 1.11 1.12),\
		$(info *** Using default go.)\
			$(shell go env GOROOT)),\
		$(info *** Cannot use default go. Forcing go-1.8.)\
			/usr/lib/go-1.8))

%:
	dh $@ --buildsystem=golang --with=golang

# Instead of using DH_GOLANG_GO_GENERATE which builds everything, even
# under vendor/ (and fails for github.com/jmank88/nuts), only generate
# code for the dep package.
override_dh_auto_build:
	GOPATH=$(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE) go generate github.com/golang/dep
	dh_auto_build

override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/go-dep/usr/share/gocode debian/go-dep/usr/bin/licenseok