~dricottone/huttese-apk

ref: 4c477ad90f1340a2be8e95c558b0775540551ac5 huttese-apk/sr.ht/metrics.sr.ht/APKBUILD -rw-r--r-- 819 bytes
4c477ad9 — Drew DeVault metrics.sr.ht: use $_pkgname for tarball 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 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"