blob: b542bad1aa2ee045f914028f010f3fb3bc9ac0cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Maintainer: nixfloyd <nixfloyd@gmail.com>
pkgname="prometheus-snmp-exporter"
_pkgname="snmp_exporter"
pkgver="0.16.1"
pkgrel=0
pkgdesc="Description"
url="https://github.com/prometheus/snmp_exporter"
arch="all"
license="Apache-2.0"
makedepends="go net-snmp-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="
$pkgname-$pkgver.tar.gz::https://github.com/prometheus/snmp_exporter/archive/v$pkgver.tar.gz
prometheus-snmp-exporter.initd
prometheus-snmp-exporter.confd
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
go build
cd generator
go build
cd ..
}
check() {
go test
}
package() {
# Replace with proper package command(s)
install -Dm755 snmp_exporter \
"$pkgdir"/usr/bin/prometheus-snmp-exporter
install -Dm755 generator/generator \
"$pkgdir"/usr/bin/prometheus-snmp-generator
install -Dm644 snmp.yml \
"$pkgdir"/etc/prometheus/snmp.yml
install -Dm644 -t "$pkgdir"/usr/share/doc/prometheus-snmp-exporter/ \
README.md
install -Dm644 -t "$pkgdir"/usr/share/doc/prometheus-snmp-exporter/examples/ \
generator/generator.yml
install -Dm644 -t "$pkgdir"/usr/share/doc/prometheus-snmp-exporter/generator/ \
generator/README.md
install -m755 -D "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname
}
sha512sums="ca82464e66c5ac44b46b790582508066e369bcdc1ec9fd06e6576762a8d7afd41bad279717b50f43e3eb7dad156e820432357e52cbbe17e2d87f1621b51e0df5 prometheus-snmp-exporter-0.16.1.tar.gz
42fadcab29b0bac956dd547ca70bb0d3b92b151ba739b5fb94519157ef54f180e13e50a22cb11c701657631bc1c48f3bf5448459ec24bca98fee4f735b07397c prometheus-snmp-exporter.initd
489cb298e215bd9647aa5293d456106eb26a73f5fbd9d42fab68de26d273ebb612dba01ba113ce58521b543a2f82a10ad86dc35056ef8d0438b39e77be61f67e prometheus-snmp-exporter.confd"
|