summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Whited2020-04-26 07:27:18 -0400
committerSam Whited2020-04-26 07:27:18 -0400
commit785bfaf174c6f6c924201466a6f5226476e03b1a (patch)
treee8ae2dfad09d86cbe000709c003aebee353c888a
downloadaur-785bfaf174c6f6c924201466a6f5226476e03b1a.tar.gz
Add initial version
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD36
2 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5d7a6dce0b9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = prometheus-xmpp-blackbox-exporter
+ pkgdesc = A Prometheus exporter which probes XMPP based services.
+ pkgver = 0.4.0
+ pkgrel = 1
+ url = https://github.com/horazont/xmpp-blackbox-exporter
+ arch = x86_64
+ license = Apache
+ makedepends = go
+ depends = glibc
+ source = xmpp-blackbox-exporter-0.4.0.tar.gz::https://github.com/horazont/xmpp-blackbox-exporter/archive/v0.4.0.tar.gz
+ sha256sums = fe833dc0062a8d8c82624659fe7986982e6002e0fe90a04001b1dd69b625956c
+
+pkgname = prometheus-xmpp-blackbox-exporter
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..22bb7309f0b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Sam Whited <sam@samwhited.com>
+
+_pkgname=xmpp-blackbox-exporter
+pkgname=prometheus-${_pkgname}
+pkgver=0.4.0
+pkgrel=1
+pkgdesc='A Prometheus exporter which probes XMPP based services.'
+arch=(x86_64)
+url='https://github.com/horazont/xmpp-blackbox-exporter'
+license=('Apache')
+depends=(glibc)
+makedepends=(go)
+source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/horazont/${_pkgname}/archive/v${pkgver}.tar.gz")
+sha256sums=('fe833dc0062a8d8c82624659fe7986982e6002e0fe90a04001b1dd69b625956c')
+
+check() {
+ cd "${_pkgname}-${pkgver}/"
+ go test -v ./...
+}
+
+build() {
+ cd "${_pkgname}-${pkgver}/"
+ GOCACHE="${srcdir}/cache" go build \
+ -trimpath \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ -buildmode=pie \
+ ./cmd/prometheus-xmpp-blackbox-exporter
+}
+
+package() {
+ cd "${_pkgname}-${pkgver}/"
+ install -Dm755 prometheus-xmpp-blackbox-exporter -t "${pkgdir}"/usr/bin/
+ install -Dm644 example.yml -t "${pkgdir}"/etc/${_pkgname}
+}
+
+# vim: ts=2 sw=2 et: