commit:     0bde5fabdc2e11c724fbee901dc636b0eefb61ed
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 14 02:28:22 2021 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon Jun 14 02:49:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bde5fab

net-p2p/energi3: Official golang implementation of the Energi Core

Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 net-p2p/energi3/Manifest              |  1 +
 net-p2p/energi3/energi3-3.0.8.ebuild  | 39 ++++++++++++++++++++++++++++++++
 net-p2p/energi3/energi3-9999.ebuild   | 39 ++++++++++++++++++++++++++++++++
 net-p2p/energi3/files/energi3.service | 42 +++++++++++++++++++++++++++++++++++
 net-p2p/energi3/metadata.xml          | 11 +++++++++
 5 files changed, 132 insertions(+)

diff --git a/net-p2p/energi3/Manifest b/net-p2p/energi3/Manifest
new file mode 100644
index 00000000000..215a988eb37
--- /dev/null
+++ b/net-p2p/energi3/Manifest
@@ -0,0 +1 @@
+DIST energi3-3.0.8.tar.gz 10303024 BLAKE2B 
5f3ab8de6320d7a1cc8a19e35387c3d6c9e4033b124f3457f8a09d19792eed895ae7738bf72bbd0bcb5c49d369b94bb433b7556aba42134fcd36e89f66985671
 SHA512 
4c62d41db637130b20dad309c6857149a17f14a6b9d12da9951fc5824c7f7215ff6b866e7c5f3d014b5b605512ca088be80bfbb169283e3d88029338034c4daa

diff --git a/net-p2p/energi3/energi3-3.0.8.ebuild 
b/net-p2p/energi3/energi3-3.0.8.ebuild
new file mode 100644
index 00000000000..a9db495bfc4
--- /dev/null
+++ b/net-p2p/energi3/energi3-3.0.8.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit go-module systemd
+
+DESCRIPTION="Official golang implementation of the Energi Core"
+HOMEPAGE="https://www.energi.world/";
+
+if [[ ${PV} == *9999 ]] ; then
+       EGIT_REPO_URI="https://github.com/energicryptocurrency/${PN}.git";
+       EGIT_SUBMODULES=()
+       inherit git-r3
+else
+       
SRC_URI="https://github.com/energicryptocurrency/${PN}/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+       KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+IUSE=""
+RDEPEND="acct-user/energi3"
+
+src_compile() {
+       GOPATH="${WORKDIR}/${P}/vendor/" emake geth
+}
+
+src_install() {
+       einstalldocs
+       dobin build/bin/energi3
+       systemd_dounit "${FILESDIR}/energi3.service"
+}
+
+pkg_postinst() {
+       elog "Run the service:       systemctl start energi3"
+       elog "Attach to the service: energi3 attach --datadir /var/lib/energi3/"
+       elog "The user attaching must be a member of the 'energi3' group"
+}

diff --git a/net-p2p/energi3/energi3-9999.ebuild 
b/net-p2p/energi3/energi3-9999.ebuild
new file mode 100644
index 00000000000..a9db495bfc4
--- /dev/null
+++ b/net-p2p/energi3/energi3-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit go-module systemd
+
+DESCRIPTION="Official golang implementation of the Energi Core"
+HOMEPAGE="https://www.energi.world/";
+
+if [[ ${PV} == *9999 ]] ; then
+       EGIT_REPO_URI="https://github.com/energicryptocurrency/${PN}.git";
+       EGIT_SUBMODULES=()
+       inherit git-r3
+else
+       
SRC_URI="https://github.com/energicryptocurrency/${PN}/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+       KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+IUSE=""
+RDEPEND="acct-user/energi3"
+
+src_compile() {
+       GOPATH="${WORKDIR}/${P}/vendor/" emake geth
+}
+
+src_install() {
+       einstalldocs
+       dobin build/bin/energi3
+       systemd_dounit "${FILESDIR}/energi3.service"
+}
+
+pkg_postinst() {
+       elog "Run the service:       systemctl start energi3"
+       elog "Attach to the service: energi3 attach --datadir /var/lib/energi3/"
+       elog "The user attaching must be a member of the 'energi3' group"
+}

diff --git a/net-p2p/energi3/files/energi3.service 
b/net-p2p/energi3/files/energi3.service
new file mode 100644
index 00000000000..c1aca146c83
--- /dev/null
+++ b/net-p2p/energi3/files/energi3.service
@@ -0,0 +1,42 @@
+[Unit]
+Description=Energi Core Node Service
+After=syslog.target network.target
+
+[Service]
+SyslogIdentifier=energi3
+Type=simple
+User=energi3
+Group=energi3
+ExecStart=/usr/bin/energi3 \
+--datadir ${STATE_DIRECTORY} \
+--masternode \
+--mine=1 \
+--rpc \
+--rpcport 39796 \
+--rpcaddr "127.0.0.1"  \
+--rpcapi admin,eth,web3,rpc,personal,energi \
+--ws \
+--wsaddr "127.0.0.1" \
+--wsport 39795 \
+--wsapi admin,eth,net,web3,personal,energi \
+--verbosity 0
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=strict
+NoNewPrivileges=true
+PrivateDevices=true
+CapabilityBoundingSet=
+ProtectClock=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+RestrictNamespaces=true
+PrivateUsers=true
+StateDirectory=energi3
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/net-p2p/energi3/metadata.xml b/net-p2p/energi3/metadata.xml
new file mode 100644
index 00000000000..1c537a1cffe
--- /dev/null
+++ b/net-p2p/energi3/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">energicryptocurrency/energi3</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to