1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 EGO_PN=github.com/fstab/grok_exporter
9 "github.com/prometheus/client_model 56726106282f1985ea77d5305743db7231b0c0a8"
10 "github.com/prometheus/common 2998b132700a7d019ff618c06a234b47c1f3f681"
11 "github.com/prometheus/client_golang 18d13eacc9cce330610a70daf4ed0fef2e846589"
12 "github.com/prometheus/procfs b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1"
13 "github.com/matttproud/golang_protobuf_extensions c182affec369e30f25d3eb8cd8a478dee585ae7d"
14 "github.com/golang/protobuf 347cf4a86c1cb8d262994d8ef5924d4576c5b331"
15 "github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb"
16 "gopkg.in/yaml.v2 51d6538a90f86fe93ac480b35f37b2be17fef232 github.com/go-yaml/yaml" # branch v2.2.2
19 inherit user golang-build golang-vcs-snapshot
21 DESCRIPTION="Unstructured log data exporter for Prometheus"
22 HOMEPAGE="https://github.com/fstab/Grok_exporter"
23 SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
25 LICENSE="Apache-2.0 BSD MIT"
29 DEPEND=">=dev-libs/oniguruma-6.9.0"
30 RDEPEND=">=dev-libs/oniguruma-6.9.0:="
36 enewuser ${PN} -1 -1 -1 ${PN}
40 cd src/${EGO_PN} || die
41 GOPATH="${S}" go build -ldflags="
42 -X ${EGO_PN}/exporter.Version=${PV}
43 -X ${EGO_PN}/exporter.BuildDate=$(date +%Y-%m-%d)
44 -X ${EGO_PN}/exporter.Branch=master
45 -X ${EGO_PN}/exporter.Revision=${EGO_REVISION}" || die "compile failed"
49 cd src/${EGO_PN} || die
52 keepdir /var/log/${PN}
53 fowners ${PN}:${PN} /var/log/${PN}
54 newconfd "${FILESDIR}"/${PN}.confd ${PN}
55 newinitd "${FILESDIR}"/${PN}.initd ${PN}
60 if [[ -z "${REPLACING_VERSIONS}" ]]; then
61 elog "You need to create /etc/${PN}/${PN}.yml"
62 elog "Please see /usr/share/doc/${PVR} for examples"