File: rules

package info (click to toggle)
golang-golang-x-tools 1%3A0.25.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 22,724 kB
  • sloc: javascript: 2,027; asm: 1,645; sh: 166; yacc: 155; makefile: 49; ansic: 8
file content (87 lines) | stat: -rwxr-xr-x 1,818 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/make -f
# -*- makefile -*-

# Excluded binaries. List all binary names:
# go list -f '{{ if eq .Name "main" }}{{ .ImportPath }}{{ end }}' ./...
# (cd gopls && go list -f '{{ if eq .Name "main" }}{{ .ImportPath }}{{ end }}' ./...)
export DH_GOLANG_EXCLUDES := \
	cmd/signature-fuzzer \
	go/analysis/passes/httpmux/cmd/httpmux \
	gopls \
	internal/stack/gostacks \
	# EOL

# Excluded tests
export DH_GOLANG_EXCLUDES += \
	copyright \
	# EOL

# needed for tests.
export DH_GOLANG_INSTALL_EXTRA := \
	godoc/static \
	# EOL

# eg #753978
# stress #793693
# bundle #818551
RENAME_BIN := \
	bisect \
	bundle \
	deadcode \
	eg \
	stress \
	# EOL

# All go/analysis/*/*/cmd/*
RENAME_BIN += \
	defers \
	fieldalignment \
	findcall \
	ifaceassert \
	lostcancel \
	nilness \
	shadow \
	stringintconv \
	unmarshal \
	unusedresult \
	# EOL

# All cmd/auth/*
RENAME_BIN += \
	authtest \
	cookieauth \
	gitauth \
	netrcauth \
	# EOL

# All go/*/internal/*
RENAME_BIN += \
	nodecount \
	play \
	# EOL

execute_before_dh_auto_configure:
	# Copy golang.org/x/telemetry for opt-in transparent telemetry;
	# see https://go.dev/issue/58894
	mkdir -p _build
	cp -av debian/go/src _build/

execute_after_dh_auto_install:
	for i in $(RENAME_BIN); \
	do \
	    mv debian/tmp/usr/bin/$$i debian/tmp/usr/bin/golang-$$i; \
	done
	# gopls can't be not imported by other packages.
	# remove it to avoid tests in autopkgtest which causes circular
	# dependencies when updating golang-golang-x-vuln.
	rm -rvf debian/tmp/usr/share/gocode/src/golang.org/x/tools/gopls

override_dh_auto_test:
ifeq (,$(findstring gccgo, $(shell go version)))
	# use short tests where possible (especially to skip tests like
	# TestWebIndex which are very slow)
	dh_auto_test -- -short -timeout=30m
endif

%:
	dh $@ --builddirectory=_build --buildsystem=golang