Merge pull request #1068

a5af33d Add libminiupnpc and libunwind to snap. (Casey Marshall)
823843e Fix portability issues discovered with fresh snap install. (Casey Marshall)
0a56d83 Add snap packaging. (Casey Marshall)
This commit is contained in:
Riccardo Spagni 2016-09-15 15:20:38 +02:00
commit d4a533a800
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
6 changed files with 98 additions and 1 deletions

12
contrib/snap/daemon.bash Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash -e
export LD_LIBRARY_PATH=${SNAP_LIBRARY_PATH}:${SNAP}/usr/lib/x86_64-linux-gnu
export HOME=${SNAP_DATA}
cd ${SNAP_DATA}
ARGS=
if [ -e "${SNAP_DATA}/etc/monerod.conf" ]; then
ARGS="--config-file ${SNAP_DATA}/etc/monerod.conf"
fi
exec ${SNAP}/bin/monerod --detach $ARGS

3
contrib/snap/log.bash Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash -e
exec tail -c +0 -F ${SNAP_DATA}/.bitmonero/bitmonero.log

7
contrib/snap/wallet.bash Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash -e
export LD_LIBRARY_PATH=${SNAP_LIBRARY_PATH}:${SNAP}/usr/lib/x86_64-linux-gnu
export HOME=${SNAP_USER_DATA}
cd ${SNAP_USER_DATA}
exec ${SNAP}/usr/bin/rlwrap ${SNAP}/bin/monero-wallet-cli "$@"

73
snapcraft.yaml Normal file
View file

@ -0,0 +1,73 @@
name: monero
version: 0 # TODO: change this to release version in CI builds
summary: "Monero: the secure, private, untraceable cryptocurrency https://getmonero.org"
description: |
Monero is a private, secure, untraceable, decentralised digital currency.
You are your bank, you control your funds, and nobody can trace your transfers
unless you allow them to do so.
grade: devel
confinement: strict
apps:
d:
daemon: forking
command: daemon.bash
plugs:
- network
- network-bind
log:
command: log.bash
monero:
command: wallet.bash
plugs:
- network
parts:
wrapper:
plugin: dump
source: .
stage-packages:
- rlwrap
organize:
contrib/snap/daemon.bash: daemon.bash
contrib/snap/log.bash: log.bash
contrib/snap/wallet.bash: wallet.bash
snap:
- daemon.bash
- log.bash
- wallet.bash
- usr/bin/rlwrap
cmake-build:
plugin: cmake
configflags:
- -DBDB_STATIC=1
- -DUPNP_STATIC=1
- -DBoost_USE_STATIC_LIBS=1
- -DBoost_USE_STATIC_RUNTIME=1
- -DARCH=default
source: .
build-packages:
- gcc
- cmake
- pkg-config
- libunbound-dev
- libevent-dev
- libboost-all-dev
- libdb-dev
- libunwind-dev
- libminiupnpc-dev
- libldns-dev
- libexpat1-dev
- bison
- doxygen
- graphviz
stage-packages:
- libminiupnpc10
- libunbound2
- libunwind8
snap:
- bin
- usr

View file

@ -106,3 +106,4 @@ add_dependencies(daemon version)
set_property(TARGET daemon set_property(TARGET daemon
PROPERTY PROPERTY
OUTPUT_NAME "monerod") OUTPUT_NAME "monerod")
install(TARGETS daemon DESTINATION bin)

View file

@ -60,3 +60,4 @@ add_dependencies(simplewallet
set_property(TARGET simplewallet set_property(TARGET simplewallet
PROPERTY PROPERTY
OUTPUT_NAME "monero-wallet-cli") OUTPUT_NAME "monero-wallet-cli")
install(TARGETS simplewallet DESTINATION bin)