aboutsummaryrefslogtreecommitdiff
path: root/net-p2p
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2017-11-09 07:21:44 +0000
committerVasil Dimov <vd@FreeBSD.org>2017-11-09 07:21:44 +0000
commit524662834c9002363e40b1adf9e5e8408456994d (patch)
tree44f67454d8e61b6a77c53e11a0acf07389137003 /net-p2p
parent6fd0ec5eac3f4c117d265077e2b2c4947350ffcf (diff)
downloadports-524662834c9002363e40b1adf9e5e8408456994d.tar.gz
ports-524662834c9002363e40b1adf9e5e8408456994d.zip
Notes
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/Makefile1
-rw-r--r--net-p2p/monero-cli/Makefile43
-rw-r--r--net-p2p/monero-cli/distinfo3
-rw-r--r--net-p2p/monero-cli/files/monerod.in91
-rw-r--r--net-p2p/monero-cli/pkg-descr9
5 files changed, 147 insertions, 0 deletions
diff --git a/net-p2p/Makefile b/net-p2p/Makefile
index 8658bf85804e..506796c24107 100644
--- a/net-p2p/Makefile
+++ b/net-p2p/Makefile
@@ -59,6 +59,7 @@
SUBDIR += mldonkey
SUBDIR += mldonkey-core
SUBDIR += mldonkey-gui
+ SUBDIR += monero-cli
SUBDIR += namecoin
SUBDIR += namecoin-daemon
SUBDIR += napshare
diff --git a/net-p2p/monero-cli/Makefile b/net-p2p/monero-cli/Makefile
new file mode 100644
index 000000000000..370774ed38c4
--- /dev/null
+++ b/net-p2p/monero-cli/Makefile
@@ -0,0 +1,43 @@
+# Created by: Vasil Dimov <vd@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= monero-cli
+PORTVERSION= 0.11.1.0
+DISTVERSIONPREFIX= v
+CATEGORIES= net-p2p finance
+
+MAINTAINER= vd@FreeBSD.org
+COMMENT= Private, secure, untraceable, decentralised digital currency (CLI)
+
+LICENSE= BSD3CLAUSE
+
+LIB_DEPENDS= \
+ libboost_chrono.so:devel/boost-libs \
+ libboost_date_time.so:devel/boost-libs \
+ libboost_filesystem.so:devel/boost-libs \
+ libboost_program_options.so:devel/boost-libs \
+ libboost_regex.so:devel/boost-libs \
+ libboost_serialization.so:devel/boost-libs \
+ libboost_system.so:devel/boost-libs \
+ libboost_thread.so:devel/boost-libs \
+ libminiupnpc.so:net/miniupnpc \
+ libreadline.so:devel/readline \
+ libunwind.so:devel/libunwind \
+ libzmq.so:net/libzmq4
+BUILD_DEPENDS= ${LOCALBASE}/include/zmq.hpp:net/cppzmq
+
+USES= cmake compiler:c++11-lib pkgconfig ssl
+USE_GITHUB= yes
+GH_ACCOUNT= monero-project
+GH_PROJECT= monero
+
+USE_RC_SUBR= monerod
+
+USERS= monero
+GROUPS= monero
+
+PLIST_FILES= bin/monerod \
+ bin/monero-wallet-cli \
+ bin/monero-wallet-rpc
+
+.include <bsd.port.mk>
diff --git a/net-p2p/monero-cli/distinfo b/net-p2p/monero-cli/distinfo
new file mode 100644
index 000000000000..48ef2af78de0
--- /dev/null
+++ b/net-p2p/monero-cli/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1508829354
+SHA256 (monero-project-monero-v0.11.1.0_GH0.tar.gz) = b5b48d3e5317c599e1499278580e9a6ba3afc3536f4064fcf7b20840066a509b
+SIZE (monero-project-monero-v0.11.1.0_GH0.tar.gz) = 55329159
diff --git a/net-p2p/monero-cli/files/monerod.in b/net-p2p/monero-cli/files/monerod.in
new file mode 100644
index 000000000000..cf2cf3bee4b1
--- /dev/null
+++ b/net-p2p/monero-cli/files/monerod.in
@@ -0,0 +1,91 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: monerod
+# REQUIRE: LOGIN cleanvar
+# KEYWORD: shutdown
+
+# Add the following to %%LOCALBASE%%/etc/rc.conf.d/monerod to influence
+# the behavior of this script (default values are listed):
+#
+# monerod_enable="NO" # change to "YES" to enable
+# monerod_user="monero"
+# monerod_group="monero"
+# monerod_data_dir="/var/db/monero"
+# monerod_conf="%%PREFIX%%/etc/monerod.conf"
+# monerod_log="/var/log/monero.log"
+# monerod_bind_addr="0.0.0.0"
+# monerod_bind_port="18080"
+# monerod_mine_for="" # Do mining for the given address (empty: no mining)
+# monerod_mine_threads=""
+# monerod_mine_max_cpu_pct=""
+# monerod_extra_args="" # See monerod --help
+
+. /etc/rc.subr
+
+name="monerod"
+rcvar=monerod_enable
+
+load_rc_config ${name}
+
+: ${monerod_enable:="NO"}
+: ${monerod_user:="monero"}
+: ${monerod_group:="monero"}
+: ${monerod_data_dir:="/var/db/monero"}
+: ${monerod_conf:="%%PREFIX%%/etc/${name}.conf"}
+: ${monerod_log:="/var/log/${name}.log"}
+: ${monerod_bind_addr:="0.0.0.0"}
+: ${monerod_bind_port:="18080"}
+
+start_precmd="monerod_start_precmd"
+pidfile="/var/run/${name}.pid"
+command="%%PREFIX%%/bin/monerod"
+command_args=""
+command_args="${command_args} --data-dir=${monerod_data_dir}"
+command_args="${command_args} --detach"
+command_args="${command_args} --log-file=${monerod_log}"
+command_args="${command_args} --non-interactive"
+command_args="${command_args} --p2p-bind-ip=${monerod_bind_addr}"
+command_args="${command_args} --p2p-bind-port=${monerod_bind_port}"
+command_args="${command_args} --pidfile=${pidfile}"
+
+if [ -e "${monerod_conf}" ] ; then
+ command_args="${command_args} --config-file=${monerod_conf}"
+fi
+
+if [ -n "${monerod_mine_for}" ] ; then
+ a="--bg-mining-enable --start-mining=${monerod_mine_for}"
+
+ if [ -n "${monerod_mine_threads}" ] ; then
+ a="${a} --mining-threads=${monerod_mine_threads}"
+ fi
+
+ if [ -n "${monerod_mine_max_cpu_pct}" ] ; then
+ a="${a} --bg-mining-miner-target=${monerod_mine_max_cpu_pct}"
+ fi
+
+ command_args="${command_args} ${a}"
+fi
+
+command_args="${command_args} ${monerod_extra_args}"
+command_args="${command_args} >${monerod_data_dir}/monerod.stdout"
+command_args="${command_args} 2>${monerod_data_dir}/monerod.stderr"
+
+monerod_start_precmd()
+{
+ if [ ! -e "${pidfile}" ]; then
+ install -o ${monerod_user} -g ${monerod_group} -m 644 /dev/null "${pidfile}"
+ fi
+
+ if [ ! -e "${monerod_log}" ]; then
+ install -o ${monerod_user} -g ${monerod_group} -m 600 /dev/null "${monerod_log}"
+ fi
+
+ if [ ! -d "${monerod_data_dir}" ]; then
+ install -d -o ${monerod_user} -g ${monerod_group} -m 700 "${monerod_data_dir}"
+ fi
+
+ cd "${monerod_data_dir}"
+}
+
+run_rc_command "$1"
diff --git a/net-p2p/monero-cli/pkg-descr b/net-p2p/monero-cli/pkg-descr
new file mode 100644
index 000000000000..617cfdc65cf1
--- /dev/null
+++ b/net-p2p/monero-cli/pkg-descr
@@ -0,0 +1,9 @@
+Monero is a secure, private, and untraceable cryptocurrency. It is
+open-source and accessible to all. With Monero, you are your own bank.
+Only you control and are responsible for your funds. Your accounts and
+transactions are kept private from prying eyes.
+
+This is the command line interface from
+https://github.com/monero-project/monero
+
+WWW: https://getmonero.org/