-
Notifications
You must be signed in to change notification settings - Fork 6
/
snapcraft.yaml
74 lines (72 loc) · 1.98 KB
/
snapcraft.yaml
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
name: protobuf
summary: Protocol Buffers compiler
description: >
Protocol Buffers (a.k.a., protobuf) are Google's language-neutral,
platform-neutral, extensible mechanism for serializing structured
data. You can find protobuf's documentation at
https://developers.google.com/protocol-buffers/
adopt-info: protobuf
type: app
base: core20
confinement: classic # classic to allow protoc to call plugins
grade: stable
apps:
protoc:
command: bin/protoc
environment:
PATH: $SNAP/bin:$PATH
LD_LIBRARY_PATH: $SNAP_LIBRARY_PATH:$SNAP/lib:$LD_LIBRARY_PATH
protoc-gen-go:
command: bin/protoc-gen-go
protoc-gen-go-grpc:
command: bin/protoc-gen-go-grpc
parts:
protobuf:
plugin: autotools
build-packages:
- unzip
- curl
source: https://github.com/protocolbuffers/protobuf.git
source-type: git
source-tag: v3.14.0
override-pull: |
snapcraftctl pull
GIT_VER=$(git describe --dirty --always --tags | sed -r 's/v(.*)/\1/g')
echo Pulled version $GIT_VER
snapcraftctl set-version $GIT_VER
autotools-configure-parameters:
- "--prefix=/"
stage:
- bin
- include
- lib
protoc-gen-go:
plugin: go
go-channel: latest/stable
source: ignored
source-type: git
override-pull: |
go get -d -u google.golang.org/protobuf/cmd/protoc-gen-go
override-build: |
go get google.golang.org/protobuf/cmd/protoc-gen-go
stage:
- bin/protoc-gen-go
protoc-gen-go-grpc:
plugin: go
go-channel: latest/stable
source: ignored
source-type: git
override-pull: |
go get -d -u google.golang.org/grpc/cmd/protoc-gen-go-grpc
override-build: |
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
stage:
- bin/protoc-gen-go-grpc
# source: https://github.com/grpc/grpc-go
# source-type: git
# source-tag: cmd/protoc-gen-go-grpc/v1.1.0
# stage:
# - bin/protoc-gen-go-grpc
# override-build: |
# env
# snapcraftctl build