From: "Craig Andrews" <candrews@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/xmrig/files/, net-misc/xmrig/
Date: Wed, 9 Jun 2021 02:10:16 +0000 (UTC) [thread overview]
Message-ID: <1623204596.c3a17f8443a9a7ad097cf5942d40c7f129b4f5d7.candrews@gentoo> (raw)
commit: c3a17f8443a9a7ad097cf5942d40c7f129b4f5d7
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 9 02:05:37 2021 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Wed Jun 9 02:09:56 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3a17f84
net-misc/xmrig: high performance, open source cryptocurrency miner
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
net-misc/xmrig/Manifest | 1 +
net-misc/xmrig/files/xmrig.service | 34 +++++++++++++++++++++
net-misc/xmrig/metadata.xml | 23 +++++++++++++++
net-misc/xmrig/xmrig-6.12.2.ebuild | 60 ++++++++++++++++++++++++++++++++++++++
net-misc/xmrig/xmrig-9999.ebuild | 60 ++++++++++++++++++++++++++++++++++++++
5 files changed, 178 insertions(+)
diff --git a/net-misc/xmrig/Manifest b/net-misc/xmrig/Manifest
new file mode 100644
index 00000000000..a6ee92b46d1
--- /dev/null
+++ b/net-misc/xmrig/Manifest
@@ -0,0 +1 @@
+DIST xmrig-6.12.2.tar.gz 1628708 BLAKE2B 4fca418c7e0d6df25c84609d657a050f7df6383d0a5ee3a4ebf87ff26805d4f445d6c184df1651813e21ac4c972e0681d37ccb45a493cb4d1e199a6ba5e707c5 SHA512 a1e8d37955177f0988b0683c9b92dc6eef4bcaea68b3c1411917929a0573119cd13107e5a68a2a7971ec45bf2554aed5fc7d82c11d49e7411e95d9b81fe1a911
diff --git a/net-misc/xmrig/files/xmrig.service b/net-misc/xmrig/files/xmrig.service
new file mode 100644
index 00000000000..8b59fc0c131
--- /dev/null
+++ b/net-misc/xmrig/files/xmrig.service
@@ -0,0 +1,34 @@
+[Unit]
+Description=XMRig Monero Miner
+After=network-online.target
+AssertFileNotEmpty=/etc/xmrig/config.json
+
+[Service]
+ExecStartPre=+/usr/bin/randomx_boost.sh
+ExecStartPre=+/usr/bin/enable_1gb_pages.sh
+ExecStartPre=/usr/bin/xmrig --config=/etc/xmrig/config.json --dry-run
+ExecStart=/usr/bin/xmrig --config=/etc/xmrig/config.json
+StandardOutput=journal
+StandardError=journal
+DynamicUser=true
+CPUSchedulingPolicy=idle
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=strict
+NoNewPrivileges=true
+PrivateDevices=true
+CapabilityBoundingSet=
+ProtectClock=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+RestrictNamespaces=true
+PrivateUsers=true
+ConfigurationDirectory=xmrig
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-misc/xmrig/metadata.xml b/net-misc/xmrig/metadata.xml
new file mode 100644
index 00000000000..8d9e1db23fc
--- /dev/null
+++ b/net-misc/xmrig/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <longdescription lang="en">
+ XMRig High performance, open source, cross platform RandomX,
+ CryptoNight, KawPow, AstroBWT, and Argon2 CPU/GPU miner.
+ </longdescription>
+ <use>
+ <flag name="donate">
+ Set the default donation level to 1% instead of 0
+ </flag>
+ <flag name="hwloc">
+ Use <pkg>sys-apps/hwloc</pkg> for CPU affinity support
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">xmrig/xmrig</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/xmrig/xmrig-6.12.2.ebuild b/net-misc/xmrig/xmrig-6.12.2.ebuild
new file mode 100644
index 00000000000..b6e813dd772
--- /dev/null
+++ b/net-misc/xmrig/xmrig-6.12.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake optfeature systemd
+
+DESCRIPTION="RandomX, CryptoNight, KawPow, AstroBWT, and Argon2 CPU/GPU miner"
+HOMEPAGE="https://xmrig.com https://github.com/xmrig/xmrig"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/xmrig/xmrig/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="cpu_flags_x86_sse4_1 donate hwloc +ssl"
+
+DEPEND="
+ dev-libs/libuv:=
+ hwloc? ( sys-apps/hwloc:= )
+ ssl? ( dev-libs/openssl:= )
+"
+RDEPEND="
+ ${DEPEND}
+ sys-apps/msr-tools
+"
+
+src_prepare() {
+ if ! use donate ; then
+ sed -i 's/1;/0;/g' src/donate.h || die
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSE4_1=$(usex cpu_flags_x86_sse4_1)
+ -DWITH_HWLOC=$(usex hwloc)
+ -DWITH_TLS=$(usex ssl)
+ -DWITH_OPENCL=OFF
+ -DWITH_CUDA=OFF
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ default
+ keepdir /etc/xmrig
+ systemd_dounit "${FILESDIR}"/xmrig.service
+ dobin "${BUILD_DIR}/xmrig"
+ dobin "${S}/scripts/enable_1gb_pages.sh"
+ dobin "${S}/scripts/randomx_boost.sh"
+}
diff --git a/net-misc/xmrig/xmrig-9999.ebuild b/net-misc/xmrig/xmrig-9999.ebuild
new file mode 100644
index 00000000000..b6e813dd772
--- /dev/null
+++ b/net-misc/xmrig/xmrig-9999.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake optfeature systemd
+
+DESCRIPTION="RandomX, CryptoNight, KawPow, AstroBWT, and Argon2 CPU/GPU miner"
+HOMEPAGE="https://xmrig.com https://github.com/xmrig/xmrig"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/xmrig/xmrig/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="cpu_flags_x86_sse4_1 donate hwloc +ssl"
+
+DEPEND="
+ dev-libs/libuv:=
+ hwloc? ( sys-apps/hwloc:= )
+ ssl? ( dev-libs/openssl:= )
+"
+RDEPEND="
+ ${DEPEND}
+ sys-apps/msr-tools
+"
+
+src_prepare() {
+ if ! use donate ; then
+ sed -i 's/1;/0;/g' src/donate.h || die
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSE4_1=$(usex cpu_flags_x86_sse4_1)
+ -DWITH_HWLOC=$(usex hwloc)
+ -DWITH_TLS=$(usex ssl)
+ -DWITH_OPENCL=OFF
+ -DWITH_CUDA=OFF
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ default
+ keepdir /etc/xmrig
+ systemd_dounit "${FILESDIR}"/xmrig.service
+ dobin "${BUILD_DIR}/xmrig"
+ dobin "${S}/scripts/enable_1gb_pages.sh"
+ dobin "${S}/scripts/randomx_boost.sh"
+}
next reply other threads:[~2021-06-09 2:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 2:10 Craig Andrews [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-11 0:44 [gentoo-commits] repo/gentoo:master commit in: net-misc/xmrig/files/, net-misc/xmrig/ Craig Andrews
2021-09-24 13:23 Craig Andrews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1623204596.c3a17f8443a9a7ad097cf5942d40c7f129b4f5d7.candrews@gentoo \
--to=candrews@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox