summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2022-03-20 16:41:04 -0500
committerWilliam Hubbs <williamh@gentoo.org>2022-03-20 16:43:53 -0500
commit1ce7c0f98f2135bb9da7e7236693f70548f1b4ea (patch)
tree611917bf50e59364d30e8905a65ece2adf94d544 /app-metrics/snmp_exporter
parentwww-client/chromium: stable channel bump to 99.0.4844.82 (diff)
downloadgentoo-1ce7c0f98f2135bb9da7e7236693f70548f1b4ea.tar.gz
gentoo-1ce7c0f98f2135bb9da7e7236693f70548f1b4ea.tar.bz2
gentoo-1ce7c0f98f2135bb9da7e7236693f70548f1b4ea.zip
app-metrics/snmp_exporter: add 0.20.0
Closes: https://bugs.gentoo.org/781251 Closes: https://bugs.gentoo.org/834969 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-metrics/snmp_exporter')
-rw-r--r--app-metrics/snmp_exporter/Manifest2
-rw-r--r--app-metrics/snmp_exporter/snmp_exporter-0.20.0.ebuild47
2 files changed, 49 insertions, 0 deletions
diff --git a/app-metrics/snmp_exporter/Manifest b/app-metrics/snmp_exporter/Manifest
index 5d485a3f35a2..fadd9527195e 100644
--- a/app-metrics/snmp_exporter/Manifest
+++ b/app-metrics/snmp_exporter/Manifest
@@ -1 +1,3 @@
DIST snmp_exporter-0.15.0.tar.gz 1482592 BLAKE2B f7695eb37f2d702f3a6792337de7a1e878229ec20c8f4bea17d35e174219b71958aaf09bf91daaaffe12c5d03840887ce2ef3b37ce58a56352e8bcbb418bdb5f SHA512 1050a25d12a8201deab0ab7ea95dc35e250954a321d14251c10f87b016c879cf036e01f4043e3463607200381de63f12ea6bcf094dea2939707545f978c2675b
+DIST snmp_exporter-0.20.0-deps.tar.xz 167938880 BLAKE2B 26db1effd4c74c1d8ad063e390e3ebc2f652bc901b679a70dfa2fda479ead9622eb3bf729f24a3a0088d9b154be108e472218a84109ef23d8413e0db2f8afc9e SHA512 f2b2e72967bd7255abf5f808d1dbb5691755d232b32e0c833ebc9b74a469b5c2b704afb7f32c1c591653a4ad6162efc5ec13345e9f5e2d08c7f01d24bdddf3a1
+DIST snmp_exporter-0.20.0.tar.gz 290899 BLAKE2B 81c2c6e8b1f61fe322cf040910744857f0628b61172774069675f5702d7e8dcc443a5567d5fe9d3e26139fee87c3cae8ed5fb7ce21c13b8a0f0cab1cd76384aa SHA512 fe09033e713f12b5a6ad79445def55c8d94c75cbee5e4e7c4683e853c1a8335005462d607e0c7306d2ee6e70178edeb9b6cff0c35aa6d36a4d0fa5ce45cedb51
diff --git a/app-metrics/snmp_exporter/snmp_exporter-0.20.0.ebuild b/app-metrics/snmp_exporter/snmp_exporter-0.20.0.ebuild
new file mode 100644
index 000000000000..8752286662b1
--- /dev/null
+++ b/app-metrics/snmp_exporter/snmp_exporter-0.20.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+SNMP_EXPORTER_COMMIT=c33572b6
+inherit go-module
+
+DESCRIPTION="Prometheus exporter for snmp metrics"
+HOMEPAGE="https://github.com/prometheus/snmp_exporter"
+SRC_URI="https://github.com/prometheus/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
+
+LICENSE="Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+COMMON_DEPEND="acct-group/snmp_exporter
+ acct-user/snmp_exporter
+ net-analyzer/net-snmp"
+ DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+BDEPEND="dev-util/promu"
+
+src_prepare() {
+ default
+ sed -i -e "s/{{.Revision}}/${SNMP_EXPORTER_COMMIT}/" .promu.yml || die
+}
+
+src_compile() {
+ promu build --prefix bin || die
+ pushd generator || die
+ ego build -o ../bin/generator
+ popd || die
+}
+
+src_install() {
+ dobin bin/*
+ dodoc {README,CONTRIBUTING}.md generator/{FORMAT,README}.md generator/generator.yml
+ insinto /etc/snmp_exporter
+ newins snmp.yml snmp.yml.example
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ keepdir /var/lib/snmp_exporter /var/log/snmp_exporter
+ fowners ${PN}:${PN} /var/lib/snmp_exporter /var/log/snmp_exporter
+}