~dricottone/huttese-apk

ref: 534bdde98e12f896f635f6231aa998248d4f66b0 huttese-apk/prometheus/alertmanager/APKBUILD -rw-r--r-- 1.7 KiB
534bdde9 — Drew DeVault paste.sr.ht: add py3-yaml dependency 5 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=alertmanager
pkgver=0.17.0
pkgrel=0
pkgdesc="Prometheus Alertmanager"
url="https://github.com/prometheus/alertmanager"
arch="all"
license="Apache-2.0"
install="$pkgname.pre-install"
makedepends="go bzr"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/prometheus/alertmanager/archive/v$pkgver.tar.gz
	alertmanager.confd
	alertmanager.initd
"
subpackages="$pkgname-openrc"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # timing-dependent upstream failures

build() {
	cd "$builddir"
	go build \
		-gcflags "all=-trimpath=$PWD" \
		-asmflags "all=-trimpath=$PWD" \
		-ldflags "-extldflags $LDFLAGS" \
		./cmd/alertmanager
	go build \
		-gcflags "all=-trimpath=$PWD" \
		-asmflags "all=-trimpath=$PWD" \
		-ldflags "-extldflags $LDFLAGS" \
		./cmd/amtool
}

check() {
	cd "$builddir"
	go test ./...
}

package() {
	cd "$builddir"
	install -Dm755 alertmanager "$pkgdir"/usr/bin/alertmanager
	install -Dm755 amtool "$pkgdir"/usr/bin/amtool

	install -Dm755 "$srcdir"/alertmanager.initd \
		"$pkgdir"/etc/init.d/alertmanager
	install -Dm644 "$srcdir"/alertmanager.confd \
		"$pkgdir"/etc/conf.d/alertmanager
	install -dm644 "$pkgdir"/var/lib/alertmanager/data

	install -Dm644 examples/ha/alertmanager.yml \
		"$pkgdir"/etc/alertmanager/alertmanager.yml
}

sha512sums="7cca7400640030caa44f713bda163dd142ad95e5b6b26d1976564fbc0b0888f26646b75c6bb4b6cc7405fa41bed9c727fca475245a170989c61b3b61cb797299  alertmanager-0.17.0.tar.gz
58f59d1972af10659a5d44f3e005b28928082bac733d27b10238196f68f361cd472782a83b60522c850de7fe9cf502f688956e6e1a2bb64c8aead10dc1529266  alertmanager.confd
92da9c8cdc10ec6cbfb07ae0710b56ab66260bfa78a1f40f0e4ac498cdd50bbbb0ddec2b53d16c1492a77755bfb2382478e22e2e08f0c0e6d421bc206a99e225  alertmanager.initd"