File: rules

package info (click to toggle)
golang-google-grpc 1.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports-sloppy
  • size: 2,656 kB
  • sloc: sh: 66; makefile: 52
file content (32 lines) | stat: -rwxr-xr-x 1,097 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DH_GOLANG_INSTALL_EXTRA := examples/route_guide/testdata testdata
export DH_GOLANG_EXCLUDES := grpclb benchmark
export DH_GOLANG_GO_GENERATE := 1
export BUILDDIR := build

%:
	dh $@ --buildsystem=golang --with=golang --builddirectory=$(BUILDDIR)

PB_GO_FILES := $(wildcard */*/*.pb.go */*/*/*.pb.go)

override_dh_auto_configure:
	# grpc_testingv3/testv3.pb.go is not re-generated because it was
	# intentionally generated by an older version of protoc-gen-go.
	# comments from upstream in code
	rm -v -f $(filter-out reflection/grpc_testingv3/testv3.pb.go, $(PB_GO_FILES))
	dh_auto_configure
	# Although grpclb is excluded from targets, we still need the pb.go files
	# generated in this directory.
	go generate -v ./$(BUILDDIR)/src/google.golang.org/grpc/grpclb
	mkdir -p -v $(BUILDDIR)/src/google.golang.org/
	cp -v -a debian/vendor/google.golang.org/genproto $(BUILDDIR)/src/google.golang.org/

override_dh_auto_test:
	dh_auto_test -- -short

override_dh_auto_install:
	dh_auto_install -- --no-binaries