~dricottone/huttese-apk

ref: f149859daf79f2c2a203f02de0ea94c0f4b76962 huttese-apk/prometheus/alertmanager/APKBUILD -rw-r--r-- 1.7 KiB
f149859d — Drew DeVault Install prometheus data dir 5 years ago
                                                                                
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
3312d494 Drew DeVault
06c053e6 Drew DeVault
3312d494 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
54
55
56
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=alertmanager
pkgver=0.16.2
pkgrel=1
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="94012739c5c9691ff34bb521e220e00de13ef866451ffaaa8d45f85c228c6b515a84550a819b351db36e3da7c17a0fa397b5b1c6a4cbc3451442f5064a0184a3  alertmanager-0.16.2.tar.gz
58f59d1972af10659a5d44f3e005b28928082bac733d27b10238196f68f361cd472782a83b60522c850de7fe9cf502f688956e6e1a2bb64c8aead10dc1529266  alertmanager.confd
e8164d4d897017dc1364497c657a2efc859105882a0222a18e63a73b3a034575e5ed3f138f8015d8d3cdd0bc209c7118241c2a2d55a5a2fde5bff77cfbe95a7f  alertmanager.initd"