summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-metrics/exabgp_exporter/exabgp_exporter-1.1.3.ebuild')
-rw-r--r--app-metrics/exabgp_exporter/exabgp_exporter-1.1.3.ebuild33
1 files changed, 33 insertions, 0 deletions
diff --git a/app-metrics/exabgp_exporter/exabgp_exporter-1.1.3.ebuild b/app-metrics/exabgp_exporter/exabgp_exporter-1.1.3.ebuild
new file mode 100644
index 000000000000..87ba58aa1fa2
--- /dev/null
+++ b/app-metrics/exabgp_exporter/exabgp_exporter-1.1.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd
+
+DESCRIPTION="Prometheus exporter for exabgp"
+HOMEPAGE="https://github.com/gizmoguy/exabgp_exporter"
+SRC_URI="https://github.com/gizmoguy/exabgp_exporter/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_compile() {
+ CGO_ENABLED=0 go build \
+ -ldflags "-X github.com/prometheus/common/version.Version=${PV%_*}
+ -X github.com/prometheus/common/version.Branch=master \
+ -X github.com/prometheus/common/version.BuildUser=$(whoami)
+ -X github.com/prometheus/common/version.BuildDate=$(date -u +'%FT%T%z')" \
+ -o ./bin/${PN} ./cmd/exabgp_exporter/main.go || die
+}
+
+src_install() {
+ dobin ./bin/${PN}
+ dodoc README.md
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+}