summaryrefslogtreecommitdiff
path: root/net-p2p/xmr-stak
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-23 20:48:53 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-23 20:48:53 +0000
commit51536d2fe4697ba9114d611178bb9e20d3d5b729 (patch)
tree30b91d98e65985a575940ed49e756697c1f049c2 /net-p2p/xmr-stak
parent4ab6db5717ef23f29320d4c6fb9ebdb8dec1f193 (diff)
gentoo resync : 23.12.2017
Diffstat (limited to 'net-p2p/xmr-stak')
-rw-r--r--net-p2p/xmr-stak/Manifest5
-rw-r--r--net-p2p/xmr-stak/files/xmr-stak.service32
-rw-r--r--net-p2p/xmr-stak/metadata.xml18
-rw-r--r--net-p2p/xmr-stak/xmr-stak-2.2.0.ebuild64
-rw-r--r--net-p2p/xmr-stak/xmr-stak-9999.ebuild64
5 files changed, 183 insertions, 0 deletions
diff --git a/net-p2p/xmr-stak/Manifest b/net-p2p/xmr-stak/Manifest
new file mode 100644
index 000000000000..49816a7988d2
--- /dev/null
+++ b/net-p2p/xmr-stak/Manifest
@@ -0,0 +1,5 @@
+AUX xmr-stak.service 915 BLAKE2B b2dd73404538be09624ebd71f4b45f946ad1fad7a8be9b91a448b9c88ea7499d7deb8595fef32072334fc2b4ebccf90093254fa04eda1afa85c69ba02f7ac86d SHA512 a10b4ca777339bc640d03462d317480083ee4a65617260473e4e65773ca3d4c4db472da3a32b6b1b301dccd8168d624df01ddc45e698419906611ac27015e126
+DIST xmr-stak-2.2.0.tar.gz 316309 BLAKE2B 8a5042e91eff1d7a49dcf50d67430f21459509443117150f59f861edb0c145e0f336cb617ea4f2a7edfd923493efbc8f5ce9cd134a7f7af14b270c8cfdd3cc24 SHA512 1ec30b1f97043307461816e61cb7afaf9e77cfad895b13f5facf98f34da8d9b8751d9885930b0a38777017978fb4f25bb3a69a1c2a5db47b1a851bc88cd7d78d
+EBUILD xmr-stak-2.2.0.ebuild 1754 BLAKE2B fc921b9830ae5b06239be726cea03b03857c131341febfc28ba1eacd69bdc274ec10522da0d3921ed6c993a5be56177deaa4ebe95d422af878f7f8c47a888295 SHA512 5543e31a61d53b7c8e8dd42d23814eda07d672803dd66d1eaec9a1aa822a31f1044750aacf61366782b644eec4f5fdad5de4cacbc5248a737666b02598012f61
+EBUILD xmr-stak-9999.ebuild 1754 BLAKE2B fc921b9830ae5b06239be726cea03b03857c131341febfc28ba1eacd69bdc274ec10522da0d3921ed6c993a5be56177deaa4ebe95d422af878f7f8c47a888295 SHA512 5543e31a61d53b7c8e8dd42d23814eda07d672803dd66d1eaec9a1aa822a31f1044750aacf61366782b644eec4f5fdad5de4cacbc5248a737666b02598012f61
+MISC metadata.xml 655 BLAKE2B b80afc4405c0f0338c31463311fa46276f911ba47a0816173f0df698d847d48a35dcc8123fe249bb06ed967d268480809a6f4781beb0175bf37f38f463736a6f SHA512 c37afc09cdaaace2b64c153907fc0124a41aee2045bc8615257f454fe14187cac802b4249f36922a2d2206dd8ff0c00163418cc921dc8bccb9515cd8c3dd5ebb
diff --git a/net-p2p/xmr-stak/files/xmr-stak.service b/net-p2p/xmr-stak/files/xmr-stak.service
new file mode 100644
index 000000000000..00f63c0dcd96
--- /dev/null
+++ b/net-p2p/xmr-stak/files/xmr-stak.service
@@ -0,0 +1,32 @@
+[Unit]
+Description=Unified all-in-one Monero miner
+After=network-online.target
+AssertFileNotEmpty=/etc/xmr-stak/main.config
+
+[Service]
+Environment=GPU_FORCE_64BIT_PTR=1
+Environment=GPU_MAX_HEAP_SIZE=100
+Environment=GPU_USE_SYNC_OBJECTS=1
+Environment=GPU_MAX_ALLOC_PERCENT=100
+Environment=GPU_SINGLE_ALLOC_PERCENT=100
+ExecStart=/usr/bin/xmr-stak --cpu /etc/xmr-stak/cpu.config --amd /etc/xmr-stak/amd.config --nvidia /etc/xmr-stak/nvidia.config -c /etc/xmr-stak/main.config
+DynamicUser=true
+Group=video
+CPUSchedulingPolicy=idle
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=strict
+NoNewPrivileges=true
+CapabilityBoundingSet=
+MemoryDenyWriteExecute=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+RestrictRealtime=true
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+RestrictNamespaces=true
+PrivateUsers=true
+ConfigurationDirectory=xmr-stak
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/xmr-stak/metadata.xml b/net-p2p/xmr-stak/metadata.xml
new file mode 100644
index 000000000000..ad51a30e1d06
--- /dev/null
+++ b/net-p2p/xmr-stak/metadata.xml
@@ -0,0 +1,18 @@
+<?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>
+ <upstream>
+ <remote-id type="github">fireice-uk/xmr-stak</remote-id>
+ </upstream>
+ <use>
+ <flag name="cuda">Enable NVIDIA CUDA toolkit support</flag>
+ <flag name="devfee">Enable payment of devfee to the developer</flag>
+ <flag name="hwloc">Enable CPU affinity support via hwloc</flag>
+ <flag name="opencl">Enable OpenCL support</flag>
+ <flag name="webserver">Enable internal webserver</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/xmr-stak/xmr-stak-2.2.0.ebuild b/net-p2p/xmr-stak/xmr-stak-2.2.0.ebuild
new file mode 100644
index 000000000000..a135ea9bfcd9
--- /dev/null
+++ b/net-p2p/xmr-stak/xmr-stak-2.2.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/fireice-uk/xmr-stak.git"
+ inherit git-r3
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Unified all-in-one Monero miner"
+HOMEPAGE="https://github.com/fireice-uk/xmr-stak"
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="cuda devfee hwloc opencl ssl webserver"
+
+DEPEND="cuda? ( dev-util/nvidia-cuda-toolkit )
+ hwloc? ( sys-apps/hwloc )
+ opencl? ( virtual/opencl )
+ ssl? ( dev-libs/openssl:0= )
+ webserver? ( net-libs/libmicrohttpd )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cmake-utils_src_prepare
+ if ! use devfee; then
+ sed -i -e 's!fDevDonationLevel = .*;!fDevDonationLevel = 0.0;!' xmrstak/donate-level.hpp || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCUDA_ENABLE=$(usex cuda)
+ -DHWLOC_ENABLE=$(usex hwloc)
+ -DMICROHTTPD_ENABLE=$(usex webserver)
+ -DOpenCL_ENABLE=$(usex opencl)
+ -DOpenSSL_ENABLE=$(usex ssl)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ dodir /etc/xmr-stak
+}
+
+pkg_postinst() {
+ if [ ! -e "${ROOT}etc/xmr-stak/main.config" ]; then
+ ewarn "To use xmr-stack:"
+ if use cuda || use opencl; then
+ ewarn "As root or as a user that is a member of the 'video' group,"
+ fi
+ ewarn "run:"
+ ewarn "/usr/bin/xmr-stak --cpu /etc/xmr-stak/cpu.config --amd /etc/xmr-stak/amd.config --nvidia /etc/xmr-stak/nvidia.config -c /etc/xmr-stak/main.config"
+ ewarn "If the systemd will be used, xmr-stak can now be terminated and 'systemctl start xmr-stak' can be used."
+ fi
+}
diff --git a/net-p2p/xmr-stak/xmr-stak-9999.ebuild b/net-p2p/xmr-stak/xmr-stak-9999.ebuild
new file mode 100644
index 000000000000..a135ea9bfcd9
--- /dev/null
+++ b/net-p2p/xmr-stak/xmr-stak-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/fireice-uk/xmr-stak.git"
+ inherit git-r3
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Unified all-in-one Monero miner"
+HOMEPAGE="https://github.com/fireice-uk/xmr-stak"
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="cuda devfee hwloc opencl ssl webserver"
+
+DEPEND="cuda? ( dev-util/nvidia-cuda-toolkit )
+ hwloc? ( sys-apps/hwloc )
+ opencl? ( virtual/opencl )
+ ssl? ( dev-libs/openssl:0= )
+ webserver? ( net-libs/libmicrohttpd )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cmake-utils_src_prepare
+ if ! use devfee; then
+ sed -i -e 's!fDevDonationLevel = .*;!fDevDonationLevel = 0.0;!' xmrstak/donate-level.hpp || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCUDA_ENABLE=$(usex cuda)
+ -DHWLOC_ENABLE=$(usex hwloc)
+ -DMICROHTTPD_ENABLE=$(usex webserver)
+ -DOpenCL_ENABLE=$(usex opencl)
+ -DOpenSSL_ENABLE=$(usex ssl)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ dodir /etc/xmr-stak
+}
+
+pkg_postinst() {
+ if [ ! -e "${ROOT}etc/xmr-stak/main.config" ]; then
+ ewarn "To use xmr-stack:"
+ if use cuda || use opencl; then
+ ewarn "As root or as a user that is a member of the 'video' group,"
+ fi
+ ewarn "run:"
+ ewarn "/usr/bin/xmr-stak --cpu /etc/xmr-stak/cpu.config --amd /etc/xmr-stak/amd.config --nvidia /etc/xmr-stak/nvidia.config -c /etc/xmr-stak/main.config"
+ ewarn "If the systemd will be used, xmr-stak can now be terminated and 'systemctl start xmr-stak' can be used."
+ fi
+}