~dricottone/huttese-apk

ref: 5606bb981ca7c098d40e632eced725496fa064f0 huttese-apk/sr.ht/alertmanager/APKBUILD -rw-r--r-- 1.7 KiB
5606bb98 — Drew DeVault Move prometheus packages into main repo 4 years ago
                                                                                
06c053e6 Drew DeVault
b0a1695f Drew DeVault
4daf06fa Drew DeVault
06c053e6 Drew DeVault
3312d494 Drew DeVault
06c053e6 Drew DeVault
3312d494 Drew DeVault
06c053e6 Drew DeVault
3312d494 Drew DeVault
06c053e6 Drew DeVault
3312d494 Drew DeVault
06c053e6 Drew DeVault
3312d494 Drew DeVault
06c053e6 Drew DeVault
b0a1695f Drew DeVault
3312d494 Drew DeVault
34681b55 Drew DeVault
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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=alertmanager
pkgver=0.19.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() {
	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() {
	go test ./...
}

package() {
	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="2c21bfbb1001e07e81b1115439ad15e7c0e7089839e56a19c445177e322b8ef9aa2b85e96478f3c3d709cbbd3a5447662a8c55da370b84aa4b6b24f83848744b  alertmanager-0.19.0.tar.gz
58f59d1972af10659a5d44f3e005b28928082bac733d27b10238196f68f361cd472782a83b60522c850de7fe9cf502f688956e6e1a2bb64c8aead10dc1529266  alertmanager.confd
92da9c8cdc10ec6cbfb07ae0710b56ab66260bfa78a1f40f0e4ac498cdd50bbbb0ddec2b53d16c1492a77755bfb2382478e22e2e08f0c0e6d421bc206a99e225  alertmanager.initd"