net-p2p/xmr-stak: 2.3.0 version bump
authorCraig Andrews <candrews@gentoo.org>
Mon, 26 Mar 2018 13:47:45 +0000 (09:47 -0400)
committerCraig Andrews <candrews@gentoo.org>
Mon, 26 Mar 2018 13:51:19 +0000 (09:51 -0400)
Package-Manager: Portage-2.3.24, Repoman-2.3.6

net-p2p/xmr-stak/Manifest
net-p2p/xmr-stak/files/xmr-stak-2.3.0.service [new file with mode: 0644]
net-p2p/xmr-stak/xmr-stak-2.3.0.ebuild [new file with mode: 0644]
net-p2p/xmr-stak/xmr-stak-9999.ebuild

index 6fa84342d869c95417376c39cecc79edbcd636a9..cd7a943974ee6751a28b21cb05079e4b0642061f 100644 (file)
@@ -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 (file)
index 0000000..b9515c6
--- /dev/null
@@ -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-2.3.0.ebuild b/net-p2p/xmr-stak/xmr-stak-2.3.0.ebuild
new file mode 100644 (file)
index 0000000..4be0f9f
--- /dev/null
@@ -0,0 +1,65 @@
+# 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)
+       )
+       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
+}
index 7138acbe70c4adc6f3d8ff0f2f3c4b6a60a5320d..4be0f9f7cacee27eb05bb47f8fef53da50e023a9 100644 (file)
@@ -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
 }