public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-p2p/xmr-stak/, net-p2p/xmr-stak/files/
@ 2017-12-23 19:10 Craig Andrews
  0 siblings, 0 replies; 3+ messages in thread
From: Craig Andrews @ 2017-12-23 19:10 UTC (permalink / raw
  To: gentoo-commits

commit:     0ff9128b8023fd2f9730d06c7e92338c04ce1448
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 23 15:37:54 2017 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sat Dec 23 19:10:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ff9128b

net-p2p/xmr-stak: Unified all-in-one Monero miner

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-p2p/xmr-stak/Manifest               |  1 +
 net-p2p/xmr-stak/files/xmr-stak.service | 32 +++++++++++++++++
 net-p2p/xmr-stak/metadata.xml           | 18 ++++++++++
 net-p2p/xmr-stak/xmr-stak-2.2.0.ebuild  | 64 +++++++++++++++++++++++++++++++++
 net-p2p/xmr-stak/xmr-stak-9999.ebuild   | 64 +++++++++++++++++++++++++++++++++
 5 files changed, 179 insertions(+)

diff --git a/net-p2p/xmr-stak/Manifest b/net-p2p/xmr-stak/Manifest
new file mode 100644
index 00000000000..6fa84342d86
--- /dev/null
+++ b/net-p2p/xmr-stak/Manifest
@@ -0,0 +1 @@
+DIST xmr-stak-2.2.0.tar.gz 316309 BLAKE2B 8a5042e91eff1d7a49dcf50d67430f21459509443117150f59f861edb0c145e0f336cb617ea4f2a7edfd923493efbc8f5ce9cd134a7f7af14b270c8cfdd3cc24 SHA512 1ec30b1f97043307461816e61cb7afaf9e77cfad895b13f5facf98f34da8d9b8751d9885930b0a38777017978fb4f25bb3a69a1c2a5db47b1a851bc88cd7d78d

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 00000000000..00f63c0dcd9
--- /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 00000000000..ad51a30e1d0
--- /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 00000000000..a135ea9bfcd
--- /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 00000000000..a135ea9bfcd
--- /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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-p2p/xmr-stak/, net-p2p/xmr-stak/files/
@ 2018-03-26 13:51 Craig Andrews
  0 siblings, 0 replies; 3+ messages in thread
From: Craig Andrews @ 2018-03-26 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     70d2087c783b1bf0e96ce4efc9f05244ab8450fb
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 26 13:47:45 2018 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon Mar 26 13:51:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70d2087c

net-p2p/xmr-stak: 2.3.0 version bump

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 net-p2p/xmr-stak/Manifest                          |  1 +
 net-p2p/xmr-stak/files/xmr-stak-2.3.0.service      | 32 ++++++++++++++++++++++
 ...{xmr-stak-9999.ebuild => xmr-stak-2.3.0.ebuild} |  4 +--
 net-p2p/xmr-stak/xmr-stak-9999.ebuild              |  4 +--
 4 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/net-p2p/xmr-stak/Manifest b/net-p2p/xmr-stak/Manifest
index 6fa84342d86..cd7a943974e 100644
--- a/net-p2p/xmr-stak/Manifest
+++ b/net-p2p/xmr-stak/Manifest
@@ -1 +1,2 @@
 DIST xmr-stak-2.2.0.tar.gz 316309 BLAKE2B 8a5042e91eff1d7a49dcf50d67430f21459509443117150f59f861edb0c145e0f336cb617ea4f2a7edfd923493efbc8f5ce9cd134a7f7af14b270c8cfdd3cc24 SHA512 1ec30b1f97043307461816e61cb7afaf9e77cfad895b13f5facf98f34da8d9b8751d9885930b0a38777017978fb4f25bb3a69a1c2a5db47b1a851bc88cd7d78d
+DIST xmr-stak-2.3.0.tar.gz 333364 BLAKE2B f8824f545ea08267eb9f670f2aaba7cb2e98693e5603dee5fbe54bb3f3ebc21509f26bb0d10239b79675e3ce32a2f4b32b591fb3af51b4c716fbb84beeb7326e SHA512 2828789ac63ab3cb13e36c6f86d9cf82f21f15f51df873a8a3e42757d16357653823d28103f2a076afa67ce7ca277ec92c5aee25fc823806e85c3a8c80b4ae5d

diff --git a/net-p2p/xmr-stak/files/xmr-stak-2.3.0.service b/net-p2p/xmr-stak/files/xmr-stak-2.3.0.service
new file mode 100644
index 00000000000..b9515c61f79
--- /dev/null
+++ b/net-p2p/xmr-stak/files/xmr-stak-2.3.0.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 -C /etc/xmr-stak/pools.txt
+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/xmr-stak-9999.ebuild b/net-p2p/xmr-stak/xmr-stak-2.3.0.ebuild
similarity index 91%
copy from net-p2p/xmr-stak/xmr-stak-9999.ebuild
copy to net-p2p/xmr-stak/xmr-stak-2.3.0.ebuild
index 7138acbe70c..4be0f9f7cac 100644
--- a/net-p2p/xmr-stak/xmr-stak-9999.ebuild
+++ b/net-p2p/xmr-stak/xmr-stak-2.3.0.ebuild
@@ -11,7 +11,7 @@ if [[ ${PV} == "9999" ]] ; then
 	inherit git-r3
 	SRC_URI=""
 else
-	SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/${PV}.tar.gz -> ${P}.tar.gz"
 	KEYWORDS="~amd64"
 fi
 
@@ -48,7 +48,7 @@ src_configure() {
 
 src_install() {
 	cmake-utils_src_install
-	systemd_dounit "${FILESDIR}"/${PN}.service
+	systemd_newunit "${FILESDIR}"/${PN}-2.3.0.service ${PN}.service
 	dodir /etc/xmr-stak
 }
 

diff --git a/net-p2p/xmr-stak/xmr-stak-9999.ebuild b/net-p2p/xmr-stak/xmr-stak-9999.ebuild
index 7138acbe70c..4be0f9f7cac 100644
--- a/net-p2p/xmr-stak/xmr-stak-9999.ebuild
+++ b/net-p2p/xmr-stak/xmr-stak-9999.ebuild
@@ -11,7 +11,7 @@ if [[ ${PV} == "9999" ]] ; then
 	inherit git-r3
 	SRC_URI=""
 else
-	SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/${PV}.tar.gz -> ${P}.tar.gz"
 	KEYWORDS="~amd64"
 fi
 
@@ -48,7 +48,7 @@ src_configure() {
 
 src_install() {
 	cmake-utils_src_install
-	systemd_dounit "${FILESDIR}"/${PN}.service
+	systemd_newunit "${FILESDIR}"/${PN}-2.3.0.service ${PN}.service
 	dodir /etc/xmr-stak
 }
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-p2p/xmr-stak/, net-p2p/xmr-stak/files/
@ 2018-04-06 19:22 Craig Andrews
  0 siblings, 0 replies; 3+ messages in thread
From: Craig Andrews @ 2018-04-06 19:22 UTC (permalink / raw
  To: gentoo-commits

commit:     e9c1423bb64f362ff30e6c074bf27aff47829dd9
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  6 19:21:32 2018 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Fri Apr  6 19:21:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9c1423b

net-p2p/xmr-stak: Set the library path to get_libdir

Closes: https://bugs.gentoo.org/652602
See: https://github.com/fireice-uk/xmr-stak/pull/1339
Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../xmr-stak/files/xmr-stak-2.4.2-fix-paths.patch  | 68 +++++++++++++++++++++
 net-p2p/xmr-stak/xmr-stak-2.4.2-r1.ebuild          | 69 ++++++++++++++++++++++
 2 files changed, 137 insertions(+)

diff --git a/net-p2p/xmr-stak/files/xmr-stak-2.4.2-fix-paths.patch b/net-p2p/xmr-stak/files/xmr-stak-2.4.2-fix-paths.patch
new file mode 100644
index 00000000000..cd71554b377
--- /dev/null
+++ b/net-p2p/xmr-stak/files/xmr-stak-2.4.2-fix-paths.patch
@@ -0,0 +1,68 @@
+From 3bbf91be9f510ef999c62ae2d42a094d271299b7 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 6 Apr 2018 14:56:44 -0400
+Subject: [PATCH 1/2] Use EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH
+
+Use EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH to control the path to which the executable and libraries are installed.
+---
+ CMakeLists.txt | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 15a2684c..66c2f6f8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -535,23 +535,23 @@ target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
+ # do not install the binary if the project and install are equal
+ if( NOT CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR )
+     install(TARGETS xmr-stak
+-            RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
++            RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${EXECUTABLE_OUTPUT_PATH}")
+     if(CUDA_FOUND)
+         if(WIN32)
+             install(TARGETS xmrstak_cuda_backend
+-                RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
++                RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
+         else()
+             install(TARGETS xmrstak_cuda_backend
+-                LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
++                LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
+         endif()
+     endif()
+     if(OpenCL_FOUND)
+         if(WIN32)
+             install(TARGETS xmrstak_opencl_backend
+-                RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
++                RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
+         else()
+             install(TARGETS xmrstak_opencl_backend
+-                LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
++                LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
+         endif()
+     endif()
+ else()
+
+From c1d907ee03795fdce80daba6395e2a7eb1333930 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 6 Apr 2018 15:11:07 -0400
+Subject: [PATCH 2/2] Allow EXECUTABLE and LIBRARY paths to be set
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 66c2f6f8..1ff7fbb4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -522,8 +522,8 @@ else()
+     add_executable(xmr-stak ${SRCFILES_CPP})
+ endif()
+ 
+-set(EXECUTABLE_OUTPUT_PATH "bin")
+-set(LIBRARY_OUTPUT_PATH "bin")
++set(EXECUTABLE_OUTPUT_PATH "bin" CACHE STRING "Path to place executables")
++set(LIBRARY_OUTPUT_PATH "bin" CACHE STRING "Path to place libraries")
+ 
+ target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
+ 

diff --git a/net-p2p/xmr-stak/xmr-stak-2.4.2-r1.ebuild b/net-p2p/xmr-stak/xmr-stak-2.4.2-r1.ebuild
new file mode 100644
index 00000000000..046820ffa94
--- /dev/null
+++ b/net-p2p/xmr-stak/xmr-stak-2.4.2-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 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"
+	EGIT_BRANCH="dev"
+	inherit git-r3
+	SRC_URI=""
+else
+	SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/${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}"
+PATCHES=(
+	"${FILESDIR}/${PN}-2.4.2-fix-paths.patch"
+)
+
+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)
+		-DLIBRARY_OUTPUT_PATH=$(get_libdir)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	systemd_newunit "${FILESDIR}"/${PN}-2.3.0.service ${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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-06 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-23 19:10 [gentoo-commits] repo/gentoo:master commit in: net-p2p/xmr-stak/, net-p2p/xmr-stak/files/ Craig Andrews
  -- strict thread matches above, loose matches on Subject: below --
2018-03-26 13:51 Craig Andrews
2018-04-06 19:22 Craig Andrews

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox