diff options
author | Emanuel Haupt <ehaupt@FreeBSD.org> | 2018-02-10 09:35:49 +0000 |
---|---|---|
committer | Emanuel Haupt <ehaupt@FreeBSD.org> | 2018-02-10 09:35:49 +0000 |
commit | 4c763f84a9f3bc64ec6c5ce3a9105239b7cbc9e6 (patch) | |
tree | 975b908bb5b09c6c5e6896d512af26255485d8f7 /net-p2p/xmrig | |
parent | 82fc859f11378af0d1ecf971a005a82c678d3104 (diff) | |
download | ports-4c763f84a9f3bc64ec6c5ce3a9105239b7cbc9e6.tar.gz ports-4c763f84a9f3bc64ec6c5ce3a9105239b7cbc9e6.zip |
Notes
Diffstat (limited to 'net-p2p/xmrig')
-rw-r--r-- | net-p2p/xmrig/Makefile | 11 | ||||
-rw-r--r-- | net-p2p/xmrig/distinfo | 6 | ||||
-rw-r--r-- | net-p2p/xmrig/files/pkg-message.in | 8 | ||||
-rw-r--r-- | net-p2p/xmrig/files/xmrig.in | 33 | ||||
-rw-r--r-- | net-p2p/xmrig/pkg-plist | 2 |
5 files changed, 53 insertions, 7 deletions
diff --git a/net-p2p/xmrig/Makefile b/net-p2p/xmrig/Makefile index 0ea97158a4e1..3c8d68456619 100644 --- a/net-p2p/xmrig/Makefile +++ b/net-p2p/xmrig/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= xmrig -PORTVERSION= 2.4.3 +PORTVERSION= 2.4.4 DISTVERSIONPREFIX= v CATEGORIES= net-p2p @@ -18,11 +18,14 @@ LIB_DEPENDS= libmicrohttpd.so:www/libmicrohttpd \ USES= cmake:outsource USE_GITHUB= yes -PLIST_FILES= bin/xmrig %%DATADIR%%/config.json +USE_RC_SUBR= ${PORTNAME} +SUB_FILES= pkg-message +SUB_LIST= PORTNAME=${PORTNAME} USERS=${USERS} +USERS= xmrig do-install: ${INSTALL_PROGRAM} ${WRKDIR}/.build/${PORTNAME} ${STAGEDIR}${PREFIX}/bin - @${MKDIR} ${STAGEDIR}${DATADIR} - ${INSTALL_DATA} ${WRKSRC}/src//config.json ${STAGEDIR}${DATADIR} + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/src/config.json ${STAGEDIR}${ETCDIR}/config.json.sample .include <bsd.port.mk> diff --git a/net-p2p/xmrig/distinfo b/net-p2p/xmrig/distinfo index fceb56a1e242..498410f4eb10 100644 --- a/net-p2p/xmrig/distinfo +++ b/net-p2p/xmrig/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1514015779 -SHA256 (xmrig-xmrig-v2.4.3_GH0.tar.gz) = 56a4eb05e0b310b044ae30203dfb63664cdfb520c9c28dac29fa1886ca59cbc2 -SIZE (xmrig-xmrig-v2.4.3_GH0.tar.gz) = 267601 +TIMESTAMP = 1518252865 +SHA256 (xmrig-xmrig-v2.4.4_GH0.tar.gz) = 4ad514db6bbe214a9d4b9a01d1e4e5252a09554fa28c153dbdfa49a001090142 +SIZE (xmrig-xmrig-v2.4.4_GH0.tar.gz) = 267782 diff --git a/net-p2p/xmrig/files/pkg-message.in b/net-p2p/xmrig/files/pkg-message.in new file mode 100644 index 000000000000..d770d46fed0a --- /dev/null +++ b/net-p2p/xmrig/files/pkg-message.in @@ -0,0 +1,8 @@ +XMRig configuration file available at: +%%ETCDIR%%/config.json + +To automatically start XMRig at boot time: +# sysrc xmrig_enable="YES" + +To then manually start XMRig without rebooting: +# service xmrig start diff --git a/net-p2p/xmrig/files/xmrig.in b/net-p2p/xmrig/files/xmrig.in new file mode 100644 index 000000000000..961c391dfbfd --- /dev/null +++ b/net-p2p/xmrig/files/xmrig.in @@ -0,0 +1,33 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: xmrig +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# xmrig_enable (bool): Set to NO by default. +# Set it to YES to enable it. +# xmrig_user: The user account the XMRig daemon runs as. +# It uses '%%USERS%%' user by default. +# Do not sets it as empty or it will run as root. +# xmrig_conf: The configuration file XMRig uses. +# Default: %%ETCDIR%%/config.json + +. /etc/rc.subr +name="%%PORTNAME%%" +rcvar="${name}_enable" +load_rc_config ${name} + +: ${xmrig_enable:="NO"} +: ${xmrig_user:="%%USERS%%"} +: ${xmrig_conf:="%%ETCDIR%%/config.json"} + +command="/usr/sbin/daemon" +procname="%%PREFIX%%/bin/xmrig" +command_args="-f ${procname} --config=${xmrig_conf}" + +run_rc_command "$1" diff --git a/net-p2p/xmrig/pkg-plist b/net-p2p/xmrig/pkg-plist new file mode 100644 index 000000000000..48ce8625d8ae --- /dev/null +++ b/net-p2p/xmrig/pkg-plist @@ -0,0 +1,2 @@ +bin/xmrig +@sample %%ETCDIR%%/config.json.sample |