summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2018-04-19 14:51:40 -0400
committerCraig Andrews <candrews@gentoo.org>2018-04-19 14:54:27 -0400
commit1f9ea9cd3d9766def07333a0ec0721ee38b100c1 (patch)
treecff6758f19840b3e406d2935b45925e657e2e31c
parentsys-boot/efibootmgr: explicitly set PKG_CONFIG (diff)
downloadgentoo-1f9ea9cd3d9766def07333a0ec0721ee38b100c1.tar.gz
gentoo-1f9ea9cd3d9766def07333a0ec0721ee38b100c1.tar.bz2
gentoo-1f9ea9cd3d9766def07333a0ec0721ee38b100c1.zip
net-p2p/xmr-stak: Set LIBRARY_OUTPUT_PATH
Closes: https://bugs.gentoo.org/652602 Package-Manager: Portage-2.3.31, Repoman-2.3.9
-rw-r--r--net-p2p/xmr-stak/xmr-stak-2.4.3-r1.ebuild66
1 files changed, 66 insertions, 0 deletions
diff --git a/net-p2p/xmr-stak/xmr-stak-2.4.3-r1.ebuild b/net-p2p/xmr-stak/xmr-stak-2.4.3-r1.ebuild
new file mode 100644
index 000000000000..0b8976d77f85
--- /dev/null
+++ b/net-p2p/xmr-stak/xmr-stak-2.4.3-r1.ebuild
@@ -0,0 +1,66 @@
+# 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}"
+
+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
+}