forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
46 lines (43 loc) · 1.27 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
name: gaia
version: git
summary: Gaia Daemon # 79 char long summary
description: |
This snap provides the Gaia daemon gaiad and the command line
tool gaiacli.
grade: stable
confinement: strict
apps:
gaiad:
command: bin/gaiad
plugs: [home,network,network-bind]
gaiacli:
command: bin/gaiacli
plugs: [home,network,network-bind,raw-usb]
parts:
gaia:
plugin: dump
source: ./
override-pull: |
rootdir=$(pwd)
gitroot=$(git rev-parse --show-toplevel)
cd ${gitroot} && git archive \
-o ${rootdir}/gaia-git.tar.gz \
--format tar.gz -9 --prefix gaia-git/ HEAD
cd ${rootdir}
tar xf gaia-git.tar.gz ; rm -f gaia-git.tar.gz
mkdir -p go/src/github.com/cosmos bin
mv gaia-git/ go/src/github.com/cosmos/cosmos-sdk/
build-snaps: [go]
override-build: |
base=`pwd`
export GO111MODULE=on
export GOPATH=`pwd`/go
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH
cd $GOPATH/src/github.com/cosmos/cosmos-sdk
make go-mod-cache
make tools
make install
mkdir $SNAPCRAFT_PART_INSTALL/bin
cp $GOPATH/bin/gaiad $SNAPCRAFT_PART_INSTALL/bin
cp $GOPATH/bin/gaiacli $SNAPCRAFT_PART_INSTALL/bin