~dricottone/huttese-apk

ref: cc12d7352532b481afe66c63cdde94ae7743de83 huttese-apk/sr.ht/alertmanager-irc-relay/APKBUILD -rw-r--r-- 1.9 KiB
cc12d735 — Drew DeVault meta.sr.ht: remove py3-prometheus-client dependency 4 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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=alertmanager-irc-relay
pkgver=20200105
_commit=aebe137d2e9545de98da1959b3036d5a612c8df3
pkgrel=0
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/$_commit.tar.gz
	alertmanager-irc-relay.confd
	alertmanager-irc-relay.initd
	alertmanager-irc-relay.yml
"
subpackages="$pkgname-openrc"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # requires running IRC server

prepare() {
	go mod init github.com/google/alertmanager-irc-relay
	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="bb1ecac858cee6403d591a3e600138a12549adcd27f1d3c6136966f163bef9cac697019af0fcd859bc2fd7c6b3ca7bef444d1566559203f7561408fbdd3eeee9  alertmanager-irc-relay-20200105.tar.gz
4ff1d1f4bf8488a22086377030327d46c7222a0a5da640bc900d9ba82dc7c5a8fa6ef8cca394983756bfd30d9dd1fb52cc27df423bbb6e630138df0ae0108422  alertmanager-irc-relay.confd
cbca33bd2ce0a27a7abaa586356663e4fc8b3facb03b82054077b34f2ed26bab5ca188accd22fdc1e19bbd02bb8a51926183d57715598838d69bbdda14ea4db7  alertmanager-irc-relay.initd
646f9241087dd5c595f198b829109c975fb0c637026d59a6a271ae04fe0285744bc527797b171ad3840c543801ebeaad15925f906247de0cf2c86af96b57d9fa  alertmanager-irc-relay.yml"