aboutsummaryrefslogtreecommitdiffstats
path: root/community/prometheus/APKBUILD
diff options
context:
space:
mode:
authornixfloyd <nixfloyd@gmail.com>2020-01-01 01:59:00 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2020-01-01 18:17:19 +0000
commit7c4d5caee472bf0e011b35742ed81d896a7b1d54 (patch)
tree7fb682690020fd1cef3f0cfd85226e16f2cd0e0b /community/prometheus/APKBUILD
parent51d496a24ed30cf9693e3a1d5ee1b6902971fa9b (diff)
downloadaports-7c4d5caee472bf0e011b35742ed81d896a7b1d54.tar.bz2
aports-7c4d5caee472bf0e011b35742ed81d896a7b1d54.tar.xz
community/prometheus: fix init scripts and assets
- Fix the init script to reference the correct variables (otherwise prometheus tries to start in /) - Embed static assets so that the built-in web-ui will work, without adding extra files to the package Closes !2652
Diffstat (limited to 'community/prometheus/APKBUILD')
-rw-r--r--community/prometheus/APKBUILD15
1 files changed, 12 insertions, 3 deletions
diff --git a/community/prometheus/APKBUILD b/community/prometheus/APKBUILD
index b89bd388f7..4eca63611c 100644
--- a/community/prometheus/APKBUILD
+++ b/community/prometheus/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=prometheus
pkgver=2.15.1
-pkgrel=0
+pkgrel=1
pkgdesc="The Prometheus monitoring system and time series database"
url="https://github.com/prometheus/prometheus"
arch="all"
@@ -16,11 +16,20 @@ source="
subpackages="$pkgname-openrc"
options="!check" # Broken by integrations we don't care about
+prepare() {
+ default_prepare
+ cd web/ui
+ go generate -x -v
+ cd ../../
+ gofmt -w ./web/ui
+}
+
build() {
go build \
-trimpath \
-mod=vendor \
-ldflags "-extldflags $LDFLAGS" \
+ -tags netgo,builtinassets \
./cmd/prometheus
go build \
-trimpath \
@@ -48,5 +57,5 @@ package() {
}
sha512sums="b08dfa48bddb6e007cd0fd4553847e824d6adfc047d97151b8dd12dbd1f67cfb9301824b320f1cabe9644159e6968b3fd2ee8104a5d53822a9965423c4bb47b5 prometheus-2.15.1.tar.gz
-6e0edcae0c64b319926b2cbe92b59be51b00fde15f83098bfe9f622a71d60598aa87d26aaec802716ace17e399900cb05b106087ab28e5dd4eff5106c0f1cbfc prometheus.confd
-e747fa8d806ef9cdf224d63f9802646985b812aaddfd9b6fcc453348f810fec8cce30605f9bbd709809cb66b4638903623a1284efdbdf09725135cc956165475 prometheus.initd"
+24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239 prometheus.confd
+bdc179cb3b8b5d3416e74a0b31002bd7b456b204404579dd40c38cade43eb26b106d16ea2597755035035eca567d34bfa44913eaa28870c3f22e1105d47908ab prometheus.initd"