blob: 04782b54343ce84ce21fc09b7c2a5e5dae07ed05 (
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
40
41
42
43
44
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PV=${PV/_rc/.RC}
inherit go-module
DESCRIPTION="Unstructured log data exporter for Prometheus"
HOMEPAGE="https://github.com/fstab/Grok_exporter"
SRC_URI="https://github.com/fstab/grok_exporter/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0 BSD MIT"
SLOT="0"
KEYWORDS="~amd64"
COMMON_DEPEND="acct-group/grok_exporter
acct-user/grok_exporter"
DEPEND="${COMMON_DEPEND}
>=dev-libs/oniguruma-6.9.0"
RDEPEND="${COMMON_DEPEND}
>=dev-libs/oniguruma-6.9.0:="
RESTRICT="strip"
S="${WORKDIR}/${PN}-${MY_PV}"
src_compile() {
ego build .
}
src_install() {
dobin ${PN}
dodoc -r *.md example
newinitd "${FILESDIR}"/${PN}.initd ${PN}
keepdir /etc/"${PN}"
keepdir /var/log/${PN}
fowners ${PN}:${PN} /var/log/${PN}
}
pkg_postinst() {
if [[ -z "${REPLACING_VERSIONS}" ]]; then
elog "You need to create /etc/${PN}/${PN}.yml"
elog "Please see /usr/share/doc/${PVR} for examples"
fi
}
|