summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2023-10-29 10:15:19 -0700
committerJohn Helmert III <ajak@gentoo.org>2023-10-29 10:21:50 -0700
commit3448245ff66ebd4df46bcef57da81492fcedd6df (patch)
tree6345873eb1f84c39b5a71f343985d6a5712bd70e /app-metrics/snmp_exporter
parentsys-kernel/gentoo-sources: drop 5.15.136 (diff)
downloadgentoo-3448245ff66ebd4df46bcef57da81492fcedd6df.tar.gz
gentoo-3448245ff66ebd4df46bcef57da81492fcedd6df.tar.bz2
gentoo-3448245ff66ebd4df46bcef57da81492fcedd6df.zip
app-metrics/snmp_exporter: add 0.24.1
Bug: https://bugs.gentoo.org/883649 Signed-off-by: John Helmert III <ajak@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.24.1.ebuild52
2 files changed, 54 insertions, 0 deletions
diff --git a/app-metrics/snmp_exporter/Manifest b/app-metrics/snmp_exporter/Manifest
index 09ea205633ab..f0290ac20705 100644
--- a/app-metrics/snmp_exporter/Manifest
+++ b/app-metrics/snmp_exporter/Manifest
@@ -1,2 +1,4 @@
DIST snmp_exporter-0.21.0-deps.tar.xz 173870408 BLAKE2B 8bd9699a1ecefcfb90784892e1329919baa06349cde89106a4fa4f7543672aa4de907781183baf714aceb6b1dba5c748130e1b98577830011fed40833bedda20 SHA512 d267e596b2a5c11844aaae66d75bc40c7bcc0263bc04ad2359d29450f44c7a4be263bc453a35a75250424144b4afb4ae15afe9988f95c922d20ec975827fc88e
DIST snmp_exporter-0.21.0.tar.gz 322098 BLAKE2B 5e28186dc5da1c38be0bc2a8801c56a2a32c835886b7a4d3a8a7add91960679d250bc91e5b75fdb92fb6237d53ca2b5114aa2d6b869c1db9cc371aad6841b153 SHA512 5ebb629ebc48f38035c031f2ebd7109ee681499556771792a3cddc671561b119d144a5fd9f4e51ceaccb58dc50e3852d185ee0c7f1ac57d6307d4936dc1a45b4
+DIST snmp_exporter-0.24.1-deps.tar.xz 23690876 BLAKE2B 35cc65341bbae092fb88ebb42c24cf93c8e926265e5fc1fa67a4a38c99c013f704b4ce02704341bd6aca841fbd75cdcb98635b2f7856c94d9c17a8f96acc29c2 SHA512 090437acf2f66094982374f06ea889bb8694b018a1a74da7cd1275ae4ee4ed1c8147253d4d87b8916e8f397c029881f29bf5ad4d33bfec5d6a99efa7b1d2326b
+DIST snmp_exporter-0.24.1.tar.gz 168914 BLAKE2B 555136b42af1057cbd553a774ab96f00877f20b1d72b8f78dc87d85e958d14d56b8d58eb5aab829ad33acd9581fe80c4d65ae4faad1c8be0773e2205ac088cb2 SHA512 5268129a50bd255a9505b16d27957ab2e7a23321a25933c9a1a98cd9900aef3a882a59a43d92e021dfa6e732f84f8be1fe171271935a8eac1e023588f417822e
diff --git a/app-metrics/snmp_exporter/snmp_exporter-0.24.1.ebuild b/app-metrics/snmp_exporter/snmp_exporter-0.24.1.ebuild
new file mode 100644
index 000000000000..5e781a5c9780
--- /dev/null
+++ b/app-metrics/snmp_exporter/snmp_exporter-0.24.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+SNMP_EXPORTER_COMMIT=f8826bcf
+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/~ajak/dist/${CATEGORY}/${PN}/${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_test() {
+ emake test-flags= test
+}
+
+src_install() {
+ dobin bin/generator
+ newbin bin/${PN}-${PV} ${PN}
+ 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
+}