~dricottone/huttese-apk

ref: 80800668d39acf3b266dc12c8e31e6a376eb1b1c huttese-apk/sr.ht/prometheus/APKBUILD -rw-r--r-- 2.1 KiB
80800668 — Drew DeVault metrics.sr.ht: drop -rules from pkgname 4 years ago
                                                                                
fe42a2f7 Drew DeVault
ea25975d Drew DeVault
9777accf Drew DeVault
fe42a2f7 Drew DeVault
9777accf Drew DeVault
fe42a2f7 Drew DeVault
8d429d4f Drew DeVault
fe42a2f7 Drew DeVault
9777accf Drew DeVault
fe42a2f7 Drew DeVault
9777accf Drew DeVault
fe42a2f7 Drew DeVault
9777accf Drew DeVault
fe42a2f7 Drew DeVault
9777accf Drew DeVault
fe42a2f7 Drew DeVault
f149859d Drew DeVault
9777accf Drew DeVault
fe42a2f7 Drew DeVault
ea25975d Drew DeVault
9777accf Drew DeVault
4e02f3cd 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=prometheus
pkgver=2.15.1
pkgrel=3
pkgdesc="The Prometheus monitoring system and time series database"
url="https://github.com/prometheus/prometheus"
arch="all"
license="Apache-2.0"
install="prometheus.pre-install"
makedepends="go yarn bash"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/prometheus/prometheus/archive/v$pkgver.tar.gz
	prometheus.confd
	prometheus.initd
"
subpackages="$pkgname-openrc"
options="!check" # Broken by integrations we don't care about

build() {
	cd web/ui/react-app
	yarn --frozen-lockfile
	yarn lint
	cd ../../../
	./scripts/build_react_app.sh
	cd web/ui
	go generate -x -v
	cd ../../
	gofmt -w ./web/ui

	go build \
		-trimpath \
		-mod=vendor \
		-ldflags "-extldflags $LDFLAGS" \
		-tags netgo,builtinassets \
		./cmd/prometheus
	go build \
		-trimpath \
		-mod=vendor \
		-ldflags "-extldflags $LDFLAGS" \
		./cmd/promtool
}

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

package() {
	install -Dm755 prometheus "$pkgdir"/usr/bin/prometheus
	install -Dm755 promtool "$pkgdir"/usr/bin/promtool

	install -Dm644 "$srcdir"/prometheus.confd \
		"$pkgdir"/etc/conf.d/prometheus
	install -Dm755 "$srcdir"/prometheus.initd \
		"$pkgdir"/etc/init.d/prometheus
	install -dm644 "$pkgdir"/var/lib/prometheus/data

	install -Dm644 -t "$pkgdir"/etc/prometheus \
		documentation/examples/prometheus.yml

	mkdir -p "$pkgdir"/etc/prometheus/console_libraries
	for file in console_libraries/*
	do
		install -Dm644 -t "$pkgdir"/etc/prometheus/console_libraries/ "$file"
	done

	mkdir -p "$pkgdir"/etc/prometheus/consoles
	for file in consoles/*
	do
		install -Dm644 -t "$pkgdir"/etc/prometheus/consoles/ "$file"
	done
}

sha512sums="b08dfa48bddb6e007cd0fd4553847e824d6adfc047d97151b8dd12dbd1f67cfb9301824b320f1cabe9644159e6968b3fd2ee8104a5d53822a9965423c4bb47b5  prometheus-2.15.1.tar.gz
24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239  prometheus.confd
8845d50026c1cea525dae392fa95e06e0b20184325fa0af78e50b5fbc18dabf5526d2ef61798e1e9041840633c6057958e84ef8cce314a7b68ca67fc42bc4fe5  prometheus.initd"