50 lines
927 B
Bash
50 lines
927 B
Bash
# Copyright 1999-2021 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
inherit go-module systemd
|
|
|
|
DESCRIPTION="Grafana for Volkszaehler"
|
|
HOMEPAGE="https://github.com/andig/gravo"
|
|
|
|
if [[ ${PV} != 9999* ]] ; then
|
|
SRC_URI="https://github.com/andig/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
KEYWORDS="~amd64"
|
|
S="${WORKDIR}"
|
|
else
|
|
EGIT_REPO_URI="https://github.com/andig/${PN}.git"
|
|
inherit git-r3
|
|
S="${WORKDIR}/${P}"
|
|
fi
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
IUSE=""
|
|
|
|
BDEPEND=">=dev-lang/go-1.13
|
|
dev-go/golint"
|
|
DEPEND=""
|
|
RDEPEND="www-apps/grafana-bin"
|
|
|
|
DOCS=(
|
|
doc/dashboard.{json,png} doc/datasource.png doc/panel.png README.md
|
|
)
|
|
|
|
RESTRICT="test"
|
|
|
|
src_prepare() {
|
|
sed -i "s/golangci-lint/golint/" ${S}/Makefile || die
|
|
|
|
default
|
|
}
|
|
|
|
src_install() {
|
|
dobin gravo
|
|
|
|
einstalldocs
|
|
|
|
systemd_dounit "${FILESDIR}"/gravo.service
|
|
insinto /etc/default
|
|
newins "${FILESDIR}"/gravo.default gravo
|
|
}
|