# Maintainer: Drew DeVault <sir@cmpwn.com>
_pkgname=metrics.sr.ht
pkgname=metrics.sr.ht-rules
_commit=60e2d4b9808c4dc8baaefe41fc85674e5432dca5
pkgver=0_git20200105
pkgrel=0
pkgdesc="SourceHut Prometheus rules"
url="https://git.sr.ht/~sircmpwn/metrics.sr.ht"
arch="noarch"
license="MIT"
checkdepends="prometheus"
source="
$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$_pkgname/archive/$_commit.tar.gz
"
builddir="$srcdir/$_pkgname-$_commit"
check() {
promtool check rules *.yml
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/etc/prometheus
for f in *.yml
do
install -Dm644 -t "$pkgdir"/etc/prometheus/ "$f"
done
}
sha512sums="34e365f22cbf787d6313776bb03997cfd74b46c94596743d6dda4b451b86cf2f11c20eef87b551cc7ac5a92c3879a84b80542e923cce765a4bef62f62b030e3d metrics.sr.ht-rules-0_git20200105.tar.gz"