Do not build or install examples as gocode, only as examples.
Martina Ferrari
4 years ago
0 | |
examples/testproto
|
|
0 |
examples/*
|
debian/golang-github-grpc-ecosystem-go-grpc-prometheus-dev.install
less
more
0 | 0 |
#!/usr/bin/make -f
|
1 | 1 |
|
2 | |
export DH_GOLANG_INSTALL_ALL := 1
|
|
2 |
# Do not build or install examples.
|
|
3 |
export DH_GOLANG_EXCLUDES := examples/
|
3 | 4 |
|
4 | 5 |
%:
|
5 | 6 |
dh $@ --buildsystem=golang --with=golang
|
6 | |
|
7 | |
SRC = obj-$(DEB_BUILD_GNU_TYPE)/src/github.com/grpc-ecosystem/go-grpc-prometheus
|
8 | |
|
9 | |
# Rebuild proto files
|
10 | |
override_dh_auto_build:
|
11 | |
cd $(SRC)/examples/testproto && \
|
12 | |
GOPATH=obj-$(DEB_BUILD_GNU_TYPE) make
|
13 | |
dh_auto_build
|
14 | |
|
15 | |
# We need DH_GOLANG_INSTALL_ALL to pick up proto files, but it brings in
|
16 | |
# a bunch of misc junk as well.
|
17 | |
override_dh_auto_install:
|
18 | |
dh_auto_install --destdir=debian/tmp
|
19 | |
rm -f debian/tmp/usr/share/gocode/src/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignore
|
20 | |
rm debian/tmp/usr/share/gocode/src/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.yml
|
21 | |
rm debian/tmp/usr/share/gocode/src/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE
|
22 | |
rm debian/tmp/usr/share/gocode/src/github.com/grpc-ecosystem/go-grpc-prometheus/README.md
|