New package: snmp_exporter-0.28.0

This commit is contained in:
Leah Neukirchen 2025-04-14 18:05:08 +02:00
parent dcbc483c86
commit c5a84e8ef9
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#!/bin/sh
exec 2>&1
OPTS="--config.file=/etc/snmp_exporter/*.yml"
[ -r conf ] && . ./conf
exec chpst -u _snmp_exporter:_snmp_exporter snmp_exporter ${OPTS}

View File

@ -0,0 +1,26 @@
# Template file for 'snmp_exporter'
pkgname=snmp_exporter
version=0.28.0
revision=1
build_style=go
go_import_path="github.com/prometheus/snmp_exporter"
go_ldflags="-X github.com/prometheus/common/version.Version=${version}
-X github.com/prometheus/common/version.Revision=${version}
-X github.com/prometheus/common/version.Branch=${version}
-X github.com/prometheus/common/version.BuildDate=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d-%H:%M:%S")
-X github.com/prometheus/common/version.BuildUser=VoidLinux"
make_dirs="/etc/snmp_exporter 0755 root root"
makedepends="net-snmp-devel"
short_desc="SNMP Exporter for Prometheus"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
homepage="https://github.com/prometheus/snmp_exporter"
distfiles="https://github.com/prometheus/snmp_exporter/archive/refs/tags/v${version}.tar.gz"
checksum=3e64caf5650c99d20d19c23c5a4b4695defdabcdf812b57d02af20766e7591a8
system_accounts="_${pkgname}"
post_install() {
vsconf snmp.yml
vsv ${pkgname}
}