# Contributor: Alex Denes # Maintainer: Alex Denes pkgname=prometheus-json-exporter _pkgname=json_exporter pkgver=0.6.0 pkgrel=2 pkgdesc="Prometheus exporter which scrapes remote JSON by JSONPath" url="https://github.com/prometheus-community/json_exporter" license="Apache-2.0" arch="all !riscv64" # nonexistent riscv64 dependency downloaded at build time makedepends="go>=1.14 bash sed" install="$pkgname.pre-install $pkgname.pre-upgrade" subpackages="$pkgname-openrc" source="$_pkgname-$pkgver.tar.gz::https://github.com/prometheus-community/json_exporter/archive/v$pkgver.tar.gz json-exporter.initd json-exporter.confd 0001-disable-go-race-detector.patch " builddir="$srcdir/$_pkgname-$pkgver" export GOFLAGS="$GOFLAGS -modcacherw" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { make build } check() { make test } package() { install -Dm755 json_exporter "$pkgdir"/usr/bin/json_exporter install -Dm755 "$srcdir"/json-exporter.initd "$pkgdir"/etc/init.d/json-exporter install -Dm644 "$srcdir"/json-exporter.confd "$pkgdir"/etc/conf.d/json-exporter } sha512sums=" 8de75e146cb1a51f951e8614c1c2b1bec18d57b2576fb3a7755e87d3b5b938c9d00a9b8d72143b370abc5baaa48ee9de03aa142d31c1acc8cb029c198a0ba186 json_exporter-0.6.0.tar.gz ebed56a4b890d8c4407414befb75ec1ce12ea9af495a90e6a92e8f51ed2c5682c04bf264c0ef8e43dd4375f3418bd72f4d86a9bbfa546405acdcbe4def9c87cf json-exporter.initd 2fecc0fdf9da9179ad24c14651efec341fccf3747d4570fe0ca5e1f5db1eb7ec49ce84add28d2804c03c95acd9762a660dfe5577fe26265ef35a82fa9c455aad json-exporter.confd 0e916a9216fbf21865a3672a1159836993048de1112dc8ddbd4e8283264d7fe12c5a5e2b08adeced2db6d4d35feb799c59eae7e55d010d045e825b4a524ae5e2 0001-disable-go-race-detector.patch "