summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorNils Czernia2018-03-21 16:33:39 +0100
committerNils Czernia2018-03-21 16:33:39 +0100
commitf58c80660cc545e45f078853ec07a07dc02efb41 (patch)
tree12666ebdf38fd48772df4612660e74ba1c009d39 /PKGBUILD
downloadaur-f58c80660cc545e45f078853ec07a07dc02efb41.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c6691c884c4b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Nils Czernia <nils@czserver.de>
+
+pkgname=prometheus-snmp-exporter-generator
+pkgver=0.9.0
+pkgrel=4
+pkgdesc="Generator parse MIBs and generates configs for the snmp_exporter"
+arch=('any')
+url="https://github.com/prometheus/snmp_exporter/tree/master/generator"
+license=('Apache')
+makedepends=('git' 'go')
+source=("https://github.com/prometheus/snmp_exporter/archive/v${pkgver}.tar.gz")
+sha256sums=('ac508e8cda680cc46638c68fe71a91df012e3274fb99460fd2866637b51591fd')
+
+prepare() {
+ export GOPATH="${srcdir}/gopath"
+ mkdir -p "${GOPATH}/src/github.com/prometheus/"
+ ln -snf "${srcdir}/snmp_exporter-${pkgver}" "${GOPATH}/src/github.com/prometheus/snmp_exporter"
+
+ cd "${srcdir}/gopath"
+ go get -v github.com/prometheus/common/log
+}
+
+build() {
+ export GOPATH="${srcdir}/gopath"
+ cd "${GOPATH}/src/github.com/prometheus/snmp_exporter/generator"
+
+ go build
+}
+
+package() {
+ cd "${srcdir}/snmp_exporter-${pkgver}/generator"
+
+ install -Dm755 "generator" "${pkgdir}/usr/bin/prometheus_snmp_exporter_generator"
+ install -Dm644 "generator.yml" "${pkgdir}/usr/share/doc/prometheus_snmp_exporter_generator/generator.yml.example"
+}