summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2018-02-10 09:35:49 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2018-02-10 09:35:49 +0000
commit4c763f84a9f3bc64ec6c5ce3a9105239b7cbc9e6 (patch)
tree975b908bb5b09c6c5e6896d512af26255485d8f7
parentFix build with Clang 6. (diff)
- Update to 2.4.4
[1] - Add rc.d startup script - Move config.json to ETCDIR and install it with @sample - Add pkg-message - Add user "xmrig" to UIDs PR: 224822 [1] Submitted by: joshruehlig@gmail.com [1]
Notes
Notes: svn path=/head/; revision=461370
-rw-r--r--UIDs2
-rw-r--r--net-p2p/xmrig/Makefile11
-rw-r--r--net-p2p/xmrig/distinfo6
-rw-r--r--net-p2p/xmrig/files/pkg-message.in8
-rw-r--r--net-p2p/xmrig/files/xmrig.in33
-rw-r--r--net-p2p/xmrig/pkg-plist2
6 files changed, 54 insertions, 8 deletions
diff --git a/UIDs b/UIDs
index 310aa146303f..001f49fef190 100644
--- a/UIDs
+++ b/UIDs
@@ -101,7 +101,7 @@ pop3vscan:*:151:6::0:0:POP3VScan Daemon:/var/spool/pop3vscan:/usr/sbin/nologin
iog:*:152:80::0:0:iog Monitoring Owner:/usr/local/iog:/usr/sbin/nologin
rbldns:*:153:153::0:0:rbldnsd pseudo-user:/nonexistent:/usr/sbin/nologin
trircd:*:154:154::0:0:& user:/usr/local/etc/tr-ircd:/usr/sbin/nologin
-# free: 155
+xmrig:*:155:65534::0:0:XMRig:/nonexistent:/usr/sbin/nologin
monetdb:*:156:156::0:0:MonetDB user:/usr/local/monetdb5:/bin/sh
barman:*:157:157::0:0:Barman user:/var/barman:/bin/sh
pootle:*:158:158::0:0:Pootle User:/var/db/pootle:/usr/sbin/nologin
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