forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
/
snapcraft.yaml
45 lines (42 loc) · 1.24 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
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 GOPATH=`pwd`/go
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH
cd $GOPATH/src/github.com/cosmos/cosmos-sdk
make tools
make vendor-deps
make install
mkdir $SNAPCRAFT_PART_INSTALL/bin
cp $GOPATH/bin/gaiad $SNAPCRAFT_PART_INSTALL/bin
cp $GOPATH/bin/gaiacli $SNAPCRAFT_PART_INSTALL/bin