~dricottone/huttese-apk

ref: fe42a2f7f828e4f2db8c75af22052498add37e7b huttese-apk/prometheus/alertmanager/APKBUILD -rw-r--r-- 1.3 KiB
fe42a2f7 — Drew DeVault prometheus/prometheus: new APKBUILD 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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=alertmanager
pkgver=0.16.2
pkgrel=0
pkgdesc="Prometheus Alertmanager"
url="https://github.com/prometheus/alertmanager"
arch="all"
license="Apache-2.0"
makedepends="go bzr"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/prometheus/alertmanager/archive/v$pkgver.tar.gz
	alertmanager.initd
"
subpackages="$pkgname-openrc"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # broken time tests upstream

build() {
	cd "$builddir"
	go build -o alertmanager cmd/alertmanager/main.go
	go build -o amtool cmd/amtool/main.go
}

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

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

	install -Dm755 examples/ha/alertmanager.yml \
		"$pkgdir"/etc/alertmanager/alertmanager.yml
	install -d -m755 -o 211 -g 211 "$pkgdir"/var/lib/alertmanager

	install -Dm755 "$srcdir"/alertmanager.initd \
		"$pkgdir"/etc/init.d/alertmanager
}

sha512sums="94012739c5c9691ff34bb521e220e00de13ef866451ffaaa8d45f85c228c6b515a84550a819b351db36e3da7c17a0fa397b5b1c6a4cbc3451442f5064a0184a3  alertmanager-0.16.2.tar.gz
40c5fd04ce4d501bbd33b16abab77d47fee98cb035f9786ae231f052edbc8c6e2a3c09505269ab2c7ff6c44f3a3c129f54df7c8abe92033750666097b77668fe  alertmanager.initd"