prometheus: Improve packaging

This commit is contained in:
Toyam Cox 2017-11-11 19:19:29 -05:00
parent 20ced2da6c
commit cb6efd2371
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,9 @@
#!/bin/sh
[ -f ./conf ] && . ./conf
: ${WRKDIR:=/var/lib/prometheus}
cd "${WRKDIR}"
exec chpst -u _prometheus prometheus --config.file=/etc/prometheus/prometheus.yml $ARGS

View File

@ -1,7 +1,7 @@
# Template file for 'prometheus'
pkgname=prometheus
version=2.0.0
revision=1
revision=2
build_style=go
go_import_path="github.com/prometheus/prometheus"
go_package="github.com/prometheus/prometheus/cmd/prometheus github.com/prometheus/prometheus/cmd/promtool"
@ -9,6 +9,7 @@ go_ldflags="-X ${go_import_path}/version.Version=${version}
-X ${go_import_path}/version.Revision=${version}
-X ${go_import_path}/version.Branch=${version}
-X ${go_import_path}/version.BuildUser=VoidLinux"
conf_files="/etc/prometheus/prometheus.yml"
maintainer="Toyam Cox <Vaelatern@voidlinux.eu>"
license="Apache-2.0"
homepage="https://prometheus.io/"
@ -16,6 +17,10 @@ short_desc="Monitoring system and time series database"
distfiles="https://github.com/prometheus/prometheus/archive/v${version}.tar.gz"
checksum=6947ae9b2d414d49304034a2635f0e1ecd45ac83a4f4592ea5bcca40d6f7951b
system_accounts="_prometheus"
make_dirs="/var/lib/prometheus 700 _prometheus _prometheus"
post_install() {
vlicense LICENSE
vlicense NOTICE
@ -25,5 +30,7 @@ post_install() {
vcopy consoles etc/prometheus
vcopy console_libraries etc/prometheus
vcopy documentation/examples/* usr/share/examples/prometheus/
vcopy documentation/examples/prometheus.yml etc/prometheus/
vcopy documentation/images usr/share/doc/prometheus/
vsv prometheus
}