1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 if [[ ${PV} == "9999" ]] ; then
9 EGIT_REPO_URI="https://github.com/fireice-uk/xmr-stak.git"
10 EGIT_BRANCH="xmr-stak-rx-dev"
14 SRC_URI="https://github.com/fireice-uk/xmr-stak/archive/${PV}-rx.tar.gz -> ${P}.tar.gz"
15 S="${WORKDIR}/xmr-stak-${PV}-rx"
19 DESCRIPTION="Monero RandomX Miner"
20 HOMEPAGE="https://github.com/fireice-uk/xmr-stak"
23 IUSE="cuda hwloc opencl ssl webserver"
25 DEPEND="cuda? ( dev-util/nvidia-cuda-toolkit )
26 hwloc? ( sys-apps/hwloc )
27 opencl? ( virtual/opencl )
28 ssl? ( dev-libs/openssl:0= )
29 webserver? ( net-libs/libmicrohttpd )"
38 -DCUDA_ENABLE=$(usex cuda)
39 -DHWLOC_ENABLE=$(usex hwloc)
40 -DMICROHTTPD_ENABLE=$(usex webserver)
41 -DOpenCL_ENABLE=$(usex opencl)
42 -DOpenSSL_ENABLE=$(usex ssl)
43 -DLIBRARY_OUTPUT_PATH=$(get_libdir)
50 systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
51 doinitd "${FILESDIR}"/${PN}
52 dodir /etc/xmr-stak-rx
56 if [ ! -e "${ROOT}/etc/xmr-stak-rx/main.config" ]; then
57 ewarn "To use xmr-stack-rx:"
58 if use cuda || use opencl; then
59 ewarn "As root or as a user that is a member of the 'video' group,"
62 ewarn "/usr/bin/xmr-stak-rx --cpu /etc/xmr-stak-rx/cpu.config --amd /etc/xmr-stak-rx/amd.config --nvidia /etc/xmr-stak-rx/nvidia.config -c /etc/xmr-stak-rx/main.config -C /etc/xmr-stak-rx/pools.txt"
63 ewarn "xmr-stak-rx can now be terminated and 'systemctl start xmr-stak-rx' or '/etc/init.d/xmr-stak-rx start' can be used."