commit:     1901177f85ac9c93a17db6047947be1e3bdf4207
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 23 20:01:11 2017 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 01:13:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1901177f

net-p2p/cpuminer-opt: Optimized multi algo CPU miner

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-p2p/cpuminer-opt/Manifest                   |  1 +
 net-p2p/cpuminer-opt/cpuminer-opt-3.7.7.ebuild  | 47 +++++++++++++++++++++++++
 net-p2p/cpuminer-opt/cpuminer-opt-9999.ebuild   | 47 +++++++++++++++++++++++++
 net-p2p/cpuminer-opt/files/cpuminer-opt.service | 27 ++++++++++++++
 net-p2p/cpuminer-opt/metadata.xml               | 11 ++++++
 5 files changed, 133 insertions(+)

diff --git a/net-p2p/cpuminer-opt/Manifest b/net-p2p/cpuminer-opt/Manifest
new file mode 100644
index 00000000000..e771fe08ec5
--- /dev/null
+++ b/net-p2p/cpuminer-opt/Manifest
@@ -0,0 +1 @@
+DIST v3.7.7.tar.gz 1602520 BLAKE2B 
059afdbd90ff062c698432d352fbb9f32807219a24659f5e27990a32b791d868147cf6fa027dff60d2e16d5f43b36b826dbabdc971e4dae4e1473aaf8795b222
 SHA512 
85989257ef8ee945000621598f6a9c4ed1b8099c57902d570db3038617b787254a925865567541d75e4433aaff564ffc82bd659f645ca812f809602bef8bc7c7

diff --git a/net-p2p/cpuminer-opt/cpuminer-opt-3.7.7.ebuild 
b/net-p2p/cpuminer-opt/cpuminer-opt-3.7.7.ebuild
new file mode 100644
index 00000000000..9d637b9169d
--- /dev/null
+++ b/net-p2p/cpuminer-opt/cpuminer-opt-3.7.7.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic systemd
+
+DESCRIPTION="Optimized multi algo CPU miner"
+HOMEPAGE="https://github.com/JayDDee/cpuminer-opt";
+IUSE="cpu_flags_x86_avx2 cpu_flags_x86_sse2 curl libressl"
+LICENSE="GPL-2"
+SLOT="0"
+REQUIRED_USE="cpu_flags_x86_sse2"
+DEPEND="
+       dev-libs/gmp:0
+       dev-libs/jansson
+       curl? ( >=net-misc/curl-7.15[ssl] )
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )
+"
+RDEPEND="${DEPEND}"
+if [[ ${PV} == "9999" ]] ; then
+       SRC_URI=""
+       EGIT_REPO_URI="https://github.com/JayDDee/${PN}.git";
+       inherit git-r3
+else
+       KEYWORDS="~amd64"
+       SRC_URI="https://github.com/JayDDee/${PN}/archive/v${PV}.tar.gz";
+fi
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       append-ldflags -Wl,-z,noexecstack
+       use cpu_flags_x86_avx2 && append-cflags "-DFOUR_WAY"
+       econf --with-crypto $(use_with curl)
+}
+
+src_install() {
+       default
+       systemd_dounit "${FILESDIR}"/${PN}.service
+       insinto "/etc/${PN}"
+       doins cpuminer-conf.json
+}

diff --git a/net-p2p/cpuminer-opt/cpuminer-opt-9999.ebuild 
b/net-p2p/cpuminer-opt/cpuminer-opt-9999.ebuild
new file mode 100644
index 00000000000..9d637b9169d
--- /dev/null
+++ b/net-p2p/cpuminer-opt/cpuminer-opt-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic systemd
+
+DESCRIPTION="Optimized multi algo CPU miner"
+HOMEPAGE="https://github.com/JayDDee/cpuminer-opt";
+IUSE="cpu_flags_x86_avx2 cpu_flags_x86_sse2 curl libressl"
+LICENSE="GPL-2"
+SLOT="0"
+REQUIRED_USE="cpu_flags_x86_sse2"
+DEPEND="
+       dev-libs/gmp:0
+       dev-libs/jansson
+       curl? ( >=net-misc/curl-7.15[ssl] )
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )
+"
+RDEPEND="${DEPEND}"
+if [[ ${PV} == "9999" ]] ; then
+       SRC_URI=""
+       EGIT_REPO_URI="https://github.com/JayDDee/${PN}.git";
+       inherit git-r3
+else
+       KEYWORDS="~amd64"
+       SRC_URI="https://github.com/JayDDee/${PN}/archive/v${PV}.tar.gz";
+fi
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       append-ldflags -Wl,-z,noexecstack
+       use cpu_flags_x86_avx2 && append-cflags "-DFOUR_WAY"
+       econf --with-crypto $(use_with curl)
+}
+
+src_install() {
+       default
+       systemd_dounit "${FILESDIR}"/${PN}.service
+       insinto "/etc/${PN}"
+       doins cpuminer-conf.json
+}

diff --git a/net-p2p/cpuminer-opt/files/cpuminer-opt.service 
b/net-p2p/cpuminer-opt/files/cpuminer-opt.service
new file mode 100644
index 00000000000..90ee849c5ba
--- /dev/null
+++ b/net-p2p/cpuminer-opt/files/cpuminer-opt.service
@@ -0,0 +1,27 @@
+[Unit]
+Description=CPU mining daemon for cryptocurrencies
+After=network-online.target
+AssertFileNotEmpty=/etc/cpuminer-opt/cpuminer-conf.json
+
+[Service]
+ExecStart=/usr/bin/cpuminer --syslog 
--config=/etc/cpuminer-opt/cpuminer-conf.json
+DynamicUser=true
+CPUSchedulingPolicy=idle
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=strict
+NoNewPrivileges=true
+PrivateDevices=true
+CapabilityBoundingSet=
+MemoryDenyWriteExecute=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+RestrictRealtime=true
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+RestrictNamespaces=true
+PrivateUsers=true
+ConfigurationDirectory=cpuminer-opt
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-p2p/cpuminer-opt/metadata.xml 
b/net-p2p/cpuminer-opt/metadata.xml
new file mode 100644
index 00000000000..b95044df023
--- /dev/null
+++ b/net-p2p/cpuminer-opt/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>candr...@gentoo.org</email>
+               <name>Craig Andrews</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">JayDDee/cpuminer-opt</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to