~dricottone/huttese-apk

ref: e563dbf3e953b429a47690aae2703b650a704cb1 huttese-apk/sr.ht/prom-aggregation-gateway/APKBUILD -rw-r--r-- 1.6 KiB
e563dbf3 — Drew DeVault prom-aggregation-gateway: new aport 4 years ago
                                                                                
e563dbf3 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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=prom-aggregation-gateway
_commit=2912c3f9fadb640217f4b004e41737fef2b4ae36
pkgver=0_git20200204
pkgrel=0
pkgdesc="An aggregating push gateway for Prometheus"
url="https://github.com/weaveworks/prom-aggregation-gateway"
arch="all"
license="LGPL-3.0-only"
install="prom-aggregation-gateway.pre-install"
makedepends="go"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/weaveworks/prom-aggregation-gateway/archive/$_commit.tar.gz
	prom-aggregation-gateway.confd
	prom-aggregation-gateway.initd
"
subpackages="$pkgname-openrc"
builddir="$srcdir/$pkgname-$_commit"

build() {
	go mod init github.com/weaveworks/prom-aggregation-gateway
	go build \
		-trimpath \
		-mod=vendor \
		-ldflags "-extldflags $LDFLAGS" \
		./cmd/prom-aggregation-gateway
}

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

package() {
	install -Dm755 prom-aggregation-gateway "$pkgdir"/usr/bin/prom-aggregation-gateway

	install -Dm644 "$srcdir"/prom-aggregation-gateway.confd \
		"$pkgdir"/etc/conf.d/prom-aggregation-gateway
	install -Dm755 "$srcdir"/prom-aggregation-gateway.initd \
		"$pkgdir"/etc/init.d/prom-aggregation-gateway
}

sha512sums="1ed2919d05b6f5bdd9d748abc76c69066bc8258da7501d52050f479cd25cd165eaa17c5bb222b7c1f8ecb71829a27dddb0cf526bef03064432f9d4f81665e90c  prom-aggregation-gateway-0_git20200204.tar.gz
51986d7caf241a52e81b2a43bb136fbe7110667ba8b75047feaeb3b0e02f82ee3be0e7b91bd795bd49d77bba5a7ac36aeec5a0f35b29c368e83527e77a94fe3c  prom-aggregation-gateway.confd
5fcfad70369189b5628fe80f08ab3e9cea029fc291b18606769ad14818330ea8157d9a7d68893a73b891118ea7dcea7c9980698c7a578f5f1ca1637e3699ac7d  prom-aggregation-gateway.initd"