projects/aports·blob master · refs

44 lines · 1.6 KiB

1# Contributor: Alex Denes <[email protected]>
2# Maintainer: Alex Denes <[email protected]>
3pkgname=prometheus-json-exporter
4_pkgname=json_exporter
5pkgver=0.7.0
6pkgrel=5
7pkgdesc="Prometheus exporter which scrapes remote JSON by JSONPath"
8url="https://github.com/prometheus-community/json_exporter"
9license="Apache-2.0"
10arch="all"
11makedepends="go>=1.14 promu bash sed"
12install="$pkgname.pre-install $pkgname.pre-upgrade"
13subpackages="$pkgname-openrc"
14options="net"
15source="$_pkgname-$pkgver.tar.gz::https://github.com/prometheus-community/json_exporter/archive/v$pkgver.tar.gz
16 json-exporter.initd
17 json-exporter.confd
18 0001-disable-go-race-detector.patch
19 "
20builddir="$srcdir/$_pkgname-$pkgver"
21
22export GOFLAGS="$GOFLAGS -modcacherw"
23
24build() {
25 make PROMU=/usr/bin/promu build
26}
27
28check() {
29 make test
30}
31
32package() {
33 install -Dm755 json_exporter "$pkgdir"/usr/bin/json_exporter
34
35 install -Dm755 "$srcdir"/json-exporter.initd "$pkgdir"/etc/init.d/json-exporter
36 install -Dm644 "$srcdir"/json-exporter.confd "$pkgdir"/etc/conf.d/json-exporter
37}
38
39sha512sums="
400cd68bb0e65cb3b56f4d7356ad2a65ea52adec88ac8533061f5264836621bcd957b773dabf1594fad6a1b4392b1d5fb6e17a3f583dcb9751cbcd9b32946b4f60 json_exporter-0.7.0.tar.gz
41ebed56a4b890d8c4407414befb75ec1ce12ea9af495a90e6a92e8f51ed2c5682c04bf264c0ef8e43dd4375f3418bd72f4d86a9bbfa546405acdcbe4def9c87cf json-exporter.initd
425ca82ff843dcfa2a15925f1a03a7c6e35931397caccdee6111b948eea1b931a1fdd9297419d922683a4d23da20fcaeda65d935b81b2ab68d24f0e7a880f684a7 json-exporter.confd
430e916a9216fbf21865a3672a1159836993048de1112dc8ddbd4e8283264d7fe12c5a5e2b08adeced2db6d4d35feb799c59eae7e55d010d045e825b4a524ae5e2 0001-disable-go-race-detector.patch
44"