summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2023-02-03 21:33:01 -0600
committerWilliam Hubbs <williamh@gentoo.org>2023-02-03 21:35:01 -0600
commit709f740d84c90a8e610beaf0ab27b9aa92550edc (patch)
tree81c61559dff8e8667aa4a7353350b664ffc1ba52 /app-metrics
parentdev-libs/openssl: drop obsolete 'emake depend' (diff)
downloadgentoo-709f740d84c90a8e610beaf0ab27b9aa92550edc.tar.gz
gentoo-709f740d84c90a8e610beaf0ab27b9aa92550edc.tar.bz2
gentoo-709f740d84c90a8e610beaf0ab27b9aa92550edc.zip
app-metrics/snmp_exporter: add 0.21.0
Closes: https://bugs.gentoo.org/893152 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-metrics')
-rw-r--r--app-metrics/snmp_exporter/Manifest2
-rw-r--r--app-metrics/snmp_exporter/snmp_exporter-0.21.0.ebuild52
2 files changed, 54 insertions, 0 deletions
diff --git a/app-metrics/snmp_exporter/Manifest b/app-metrics/snmp_exporter/Manifest
index bd2b5ac96442..42fa1901eeb4 100644
--- a/app-metrics/snmp_exporter/Manifest
+++ b/app-metrics/snmp_exporter/Manifest
@@ -1,2 +1,4 @@
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
+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
diff --git a/app-metrics/snmp_exporter/snmp_exporter-0.21.0.ebuild b/app-metrics/snmp_exporter/snmp_exporter-0.21.0.ebuild
new file mode 100644
index 000000000000..57b3032a1a5d
--- /dev/null
+++ b/app-metrics/snmp_exporter/snmp_exporter-0.21.0.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=0d8c3527
+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_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
+}