forked from bitcoin-core/packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
59 lines (56 loc) · 2.59 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
name: bitcoin-core
version: 22.0
summary: peer-to-peer network based digital currency
description: |
Bitcoin is a free open source peer-to-peer electronic cash system that
is completely decentralized, without the need for a central server or
trusted parties. Users hold the crypto keys to their own money and
transact directly with each other, with the help of a P2P network to
check for double-spending.
grade: stable
confinement: strict
apps:
daemon:
command: bitcoind
plugs: [home, removable-media, network, network-bind]
environment:
# Override HOME so the datadir is located at
# ~/snap/bitcoin-core/common/.bitcoin/ instead of
# ~/snap/bitcoin-core/current/.bitcoin/, and each new version of the
# snap won't have a different data directory:
# https://docs.snapcraft.io/environment-variables/7983
HOME: $SNAP_USER_COMMON
qt:
command: desktop-launch bitcoin-qt
plugs: [home, removable-media, network, network-bind, desktop, x11, unity7]
environment:
HOME: $SNAP_USER_COMMON
DISABLE_WAYLAND: 1
cli:
command: bitcoin-cli
plugs: [home, removable-media, network]
environment:
HOME: $SNAP_USER_COMMON
parts:
bitcoin-core:
plugin: nil
override-build: |
env | grep SNAP
wget https://bitcoincore.org/bin/bitcoin-core-${SNAPCRAFT_PROJECT_VERSION}/SHA256SUMS
wget https://bitcoincore.org/bin/bitcoin-core-${SNAPCRAFT_PROJECT_VERSION}/bitcoin-${SNAPCRAFT_PROJECT_VERSION}.tar.gz
wget https://bitcoincore.org/bin/bitcoin-core-${SNAPCRAFT_PROJECT_VERSION}/bitcoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz
echo "f7ba5604241732d0ec331df23c7a5f2fba3db450685e8d4aa20329378dc7d978 SHA256SUMS" | sha256sum --check
sha256sum --ignore-missing --check SHA256SUMS
tar -xvf bitcoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz
tar -xvf bitcoin-${SNAPCRAFT_PROJECT_VERSION}.tar.gz
echo "Running tests ..."
bitcoin-${SNAPCRAFT_PROJECT_VERSION}/bin/test_bitcoin
install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin bitcoin-${SNAPCRAFT_PROJECT_VERSION}/bin/bitcoind
install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin bitcoin-${SNAPCRAFT_PROJECT_VERSION}/bin/bitcoin-qt
install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin bitcoin-${SNAPCRAFT_PROJECT_VERSION}/bin/bitcoin-cli
wget https://raw.githubusercontent.com/bitcoin/bitcoin/v${SNAPCRAFT_PROJECT_VERSION}/share/pixmaps/bitcoin128.png
install -m 0644 -D -t $SNAPCRAFT_PART_INSTALL/share/pixmaps bitcoin128.png
build-packages:
- wget
after:
- desktop-qt5