prometheus: Improve packaging
This commit is contained in:
parent
20ced2da6c
commit
cb6efd2371
9
srcpkgs/prometheus/files/prometheus/run
Executable file
9
srcpkgs/prometheus/files/prometheus/run
Executable 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
|
@ -1,7 +1,7 @@
|
|||||||
# Template file for 'prometheus'
|
# Template file for 'prometheus'
|
||||||
pkgname=prometheus
|
pkgname=prometheus
|
||||||
version=2.0.0
|
version=2.0.0
|
||||||
revision=1
|
revision=2
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path="github.com/prometheus/prometheus"
|
go_import_path="github.com/prometheus/prometheus"
|
||||||
go_package="github.com/prometheus/prometheus/cmd/prometheus github.com/prometheus/prometheus/cmd/promtool"
|
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.Revision=${version}
|
||||||
-X ${go_import_path}/version.Branch=${version}
|
-X ${go_import_path}/version.Branch=${version}
|
||||||
-X ${go_import_path}/version.BuildUser=VoidLinux"
|
-X ${go_import_path}/version.BuildUser=VoidLinux"
|
||||||
|
conf_files="/etc/prometheus/prometheus.yml"
|
||||||
maintainer="Toyam Cox <Vaelatern@voidlinux.eu>"
|
maintainer="Toyam Cox <Vaelatern@voidlinux.eu>"
|
||||||
license="Apache-2.0"
|
license="Apache-2.0"
|
||||||
homepage="https://prometheus.io/"
|
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"
|
distfiles="https://github.com/prometheus/prometheus/archive/v${version}.tar.gz"
|
||||||
checksum=6947ae9b2d414d49304034a2635f0e1ecd45ac83a4f4592ea5bcca40d6f7951b
|
checksum=6947ae9b2d414d49304034a2635f0e1ecd45ac83a4f4592ea5bcca40d6f7951b
|
||||||
|
|
||||||
|
system_accounts="_prometheus"
|
||||||
|
|
||||||
|
make_dirs="/var/lib/prometheus 700 _prometheus _prometheus"
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
vlicense NOTICE
|
vlicense NOTICE
|
||||||
@ -25,5 +30,7 @@ post_install() {
|
|||||||
vcopy consoles etc/prometheus
|
vcopy consoles etc/prometheus
|
||||||
vcopy console_libraries etc/prometheus
|
vcopy console_libraries etc/prometheus
|
||||||
vcopy documentation/examples/* usr/share/examples/prometheus/
|
vcopy documentation/examples/* usr/share/examples/prometheus/
|
||||||
|
vcopy documentation/examples/prometheus.yml etc/prometheus/
|
||||||
vcopy documentation/images usr/share/doc/prometheus/
|
vcopy documentation/images usr/share/doc/prometheus/
|
||||||
|
vsv prometheus
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user