~dricottone/huttese-apk

ref: 70c0f7f73baa158ea7fdd4d030180192decb4c1d huttese-apk/sr.ht/alertmanager-irc-relay/APKBUILD -rw-r--r-- 1.8 KiB
70c0f7f7 — Drew DeVault alertmanager-irc-relay: upgrade to 0.4.3 2 years ago
                                                                                
f32d2ead Drew DeVault
70c0f7f7 Drew DeVault
dcff9847 Drew DeVault
f32d2ead Drew DeVault
70c0f7f7 Drew DeVault
f32d2ead Drew DeVault
9299df83 Drew DeVault
f32d2ead Drew DeVault
70c0f7f7 Drew DeVault
31a6fc8f Drew DeVault
70c0f7f7 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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=alertmanager-irc-relay
pkgver=0.4.3
pkgrel=1
pkgdesc="Prometheus Alertmanager IRC relay"
url="https://github.com/google/alertmanager-irc-relay"
arch="all"
license="Apache-2.0"
install="$pkgname.pre-install"
makedepends="go"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/google/alertmanager-irc-relay/archive/v$pkgver.tar.gz
	alertmanager-irc-relay.confd
	alertmanager-irc-relay.initd
	alertmanager-irc-relay.yml
"
subpackages="$pkgname-openrc"
options="!check" # requires running IRC server

prepare() {
	default_prepare
	go mod vendor
}

build() {
	go build \
		-trimpath \
		-mod=vendor \
		-ldflags "-extldflags $LDFLAGS" \
		-tags netgo
}

check() {
	go test ./...
}

package() {
	install -Dm755 alertmanager-irc-relay "$pkgdir"/usr/bin/alertmanager-irc-relay

	install -Dm755 "$srcdir"/alertmanager-irc-relay.initd \
		"$pkgdir"/etc/init.d/alertmanager-irc-relay
	install -Dm644 "$srcdir"/alertmanager-irc-relay.confd \
		"$pkgdir"/etc/conf.d/alertmanager-irc-relay

	mkdir -p "$pkgdir"/etc/alertmanager
	install -Dm644 "$srcdir"/alertmanager-irc-relay.yml \
		"$pkgdir"/etc/alertmanager/alertmanager-irc-relay.yml
}

sha512sums="
21b1b811a3705cc17dc31560254e0dc9876407a2c9294f6ba6cdb42cdc3972d61712f393aae328e4c1135ccfd57582d573dbd215d1210d50c9827e7e87c30ffb  alertmanager-irc-relay-0.4.3.tar.gz
43707b80d9baeab8a50ef2489f3bbc61b154b18e2d4ef8be6c7392a8afa27c1884c5f6f121b41fb5095f8cf9d957f4eda98f4fa197774f86a95d3bd930593b1b  alertmanager-irc-relay.confd
4458cea59f5059921da7d609b562e9a74f20f472c320dbaa5382e733cfb18f2d2bc71655f2c574403f1a5047074b1a62e82969eea348e939fbf485bd9e3877c4  alertmanager-irc-relay.initd
646f9241087dd5c595f198b829109c975fb0c637026d59a6a271ae04fe0285744bc527797b171ad3840c543801ebeaad15925f906247de0cf2c86af96b57d9fa  alertmanager-irc-relay.yml
"