diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-09-15 15:20:38 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-09-15 15:20:38 +0200 |
commit | d4a533a8002c96301b3b010c33a60bde38315b05 (patch) | |
tree | 07c0df51b77131e3862a48cb829f69c03d0b81ca | |
parent | Merge pull request #1067 (diff) | |
parent | Add libminiupnpc and libunwind to snap. (diff) | |
download | monero-d4a533a8002c96301b3b010c33a60bde38315b05.tar.xz |
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)
-rwxr-xr-x | contrib/snap/daemon.bash | 12 | ||||
-rwxr-xr-x | contrib/snap/log.bash | 3 | ||||
-rwxr-xr-x | contrib/snap/wallet.bash | 7 | ||||
-rw-r--r-- | snapcraft.yaml | 73 | ||||
-rw-r--r-- | src/daemon/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/simplewallet/CMakeLists.txt | 3 |
6 files changed, 98 insertions, 1 deletions
diff --git a/contrib/snap/daemon.bash b/contrib/snap/daemon.bash new file mode 100755 index 000000000..41d1275de --- /dev/null +++ b/contrib/snap/daemon.bash @@ -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 diff --git a/contrib/snap/log.bash b/contrib/snap/log.bash new file mode 100755 index 000000000..c81efeb2c --- /dev/null +++ b/contrib/snap/log.bash @@ -0,0 +1,3 @@ +#!/bin/bash -e + +exec tail -c +0 -F ${SNAP_DATA}/.bitmonero/bitmonero.log diff --git a/contrib/snap/wallet.bash b/contrib/snap/wallet.bash new file mode 100755 index 000000000..004f1371e --- /dev/null +++ b/contrib/snap/wallet.bash @@ -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 "$@" diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 000000000..2ad7ad603 --- /dev/null +++ b/snapcraft.yaml @@ -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 diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index 511efcb36..a8c93aa0f 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -106,3 +106,4 @@ add_dependencies(daemon version) set_property(TARGET daemon PROPERTY OUTPUT_NAME "monerod") +install(TARGETS daemon DESTINATION bin) diff --git a/src/simplewallet/CMakeLists.txt b/src/simplewallet/CMakeLists.txt index 97852c3dc..572819899 100644 --- a/src/simplewallet/CMakeLists.txt +++ b/src/simplewallet/CMakeLists.txt @@ -59,4 +59,5 @@ add_dependencies(simplewallet version) set_property(TARGET simplewallet PROPERTY - OUTPUT_NAME "monero-wallet-cli")
\ No newline at end of file + OUTPUT_NAME "monero-wallet-cli") +install(TARGETS simplewallet DESTINATION bin) |