summaryrefslogtreecommitdiff
blob: a9db495bfc42b3f47463e0cd5e3d65da5a9ed1b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"
}