File: rules

package info (click to toggle)
golang-google-cloud 0.115.0-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 283,272 kB
  • sloc: sh: 553; makefile: 83; python: 21
file content (79 lines) | stat: -rwxr-xr-x 3,156 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
#!/usr/bin/make -f

export DH_VERBOSE := 1
# We don't want the binaries built in internal/generated/snippets, internal/godocfx, internal/postprocessor
# also disable some tests and internal/aliasgen that required more build-deps.
export DH_GOLANG_EXCLUDES := \
        auth/internal/transport/cert/cmd \
        bigtable/cmd \
        bigtable/internal/testproxy \
        httpreplay/cmd \
        internal/aliasgen \
        internal/aliasfix/cmd \
        internal/postprocessor/execv/gocmd \
        internal/actions/cmd \
        internal/protoveneer/cmd \
        internal/gapicgen/execv/gocmd \
        internal/gapicgen/cmd \
        internal/carver/cmd \
        internal/aliasgen/cmd \
        internal/generated/snippets \
        internal/godocfx \
        internal/postprocessor \
        profiler/busybench \
        pubsub/internal/benchwrapper \
        pubsub/loadtest/cmd \
        pubsub/pstest \
        storage/internal/benchmarks \
        spanner/test/opentelemetry/test \
        spanner/test/cloudexecutor \
        spanner/internal/benchwrapper \
        spanner/test

export DH_GOLANG_INSTALL_EXTRA := storage/internal/test

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

execute_after_dh_auto_configure:
	# Configure copied files into _build without the 'v2' folder.
	# We move dataproc, recaptcha and vision submodule directory into the 'v2' folder to workaround FTBFS
	mkdir -p _build/src/cloud.google.com/go/dataproc/v2
	mv _build/src/cloud.google.com/go/dataproc/apiv1 _build/src/cloud.google.com/go/dataproc/v2/
	mv _build/src/cloud.google.com/go/dataproc/internal _build/src/cloud.google.com/go/dataproc/v2/
	mkdir -p _build/src/cloud.google.com/go/recaptchaenterprise/v2
	mv _build/src/cloud.google.com/go/recaptchaenterprise/apiv1* _build/src/cloud.google.com/go/recaptchaenterprise/v2/
	mv _build/src/cloud.google.com/go/recaptchaenterprise/internal _build/src/cloud.google.com/go/recaptchaenterprise/v2/
	mkdir -p _build/src/cloud.google.com/go/vision/v2
	mv _build/src/cloud.google.com/go/vision/apiv1* _build/src/cloud.google.com/go/vision/v2/
	mv _build/src/cloud.google.com/go/vision/internal _build/src/cloud.google.com/go/vision/v2/

override_dh_auto_test:
	# Disable tests that failed to write and require Cloud Credentials/Network (Auth/Dial/etc)
	dh_auto_test -- -short -test.skip="\
	TestAggregateProto|\
	TestClient_BatchWrite|\
	TestClient_DoForEachRow|\
	TestCondition|\
	TestInstanceAdmin|\
	TestInt64Proto|\
	TestNewClient|\
	TestOCStats|\
	TestTableAdmin|\
	TestStressSessionPool|\
	TestWithEndpoint|\
	TestWriterOptions"

IPATH := cloud.google.com/go
PKG1 := golang-google-cloud-dev
PKG2 := golang-google-cloud-compute-metadata-dev
PREFIX := usr/share/gocode/src

override_dh_install:
	dh_install
	# Move compute/metadata files into separate package.
	mkdir -vp debian/$(PKG2)/$(PREFIX)/$(IPATH)/
	mv -v debian/$(PKG1)/$(PREFIX)/$(IPATH)/compute/ debian/$(PKG2)/$(PREFIX)/$(IPATH)
	# Drop executable bits to make lintian happy
	find debian/$(PKG1) -type f -executable -not -name "*.sh" -exec chmod -x {} +
	find debian/$(PKG2) -type f -executable -not -name "*.sh" -exec chmod -x {} +