47 lines
1.7 KiB
Bash
47 lines
1.7 KiB
Bash
# Template file for 'grafana'
|
|
pkgname=grafana
|
|
version=4.6.3
|
|
revision=1
|
|
build_style=go
|
|
go_import_path=github.com/grafana/grafana
|
|
go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
|
|
short_desc="The open platform for beautiful analytics and monitoring"
|
|
maintainer="Michael Aldridge <maldridge@VoidLinux.eu>"
|
|
license="Apache-2.0"
|
|
homepage="https://grafana.com"
|
|
distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz
|
|
https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${version}.linux-x64.tar.gz"
|
|
checksum="75959d1cd8f66d362b3bb885481dce77693417f51c2e81ab091e3d16650f1a69
|
|
037cf7678858c4a5b3632de7bea4c20475e081ff48c27c868be71e7b0a07c505"
|
|
|
|
system_accounts="_grafana"
|
|
_grafana_homedir="/var/lib/grafana"
|
|
|
|
conf_files="/etc/grafana/grafana.ini"
|
|
|
|
post_install() {
|
|
vlicense LICENSE.md
|
|
|
|
vmkdir var/lib/grafana
|
|
touch ${DESTDIR}/var/lib/grafana/.empty
|
|
|
|
# These artifacts are pulled from the binary distribution
|
|
# because they can't be built by Void.
|
|
vmkdir usr/share/grafana
|
|
vcopy public usr/share/grafana/
|
|
vcopy conf usr/share/grafana/
|
|
|
|
# This next step is an aweful hack, we need to create the base
|
|
# config file to allow this to startup out of the box, but we
|
|
# don't want to version the config file.
|
|
vmkdir etc/grafana
|
|
vinstall conf/defaults.ini 0644 etc/grafana grafana.ini
|
|
sed -i "s:data = data:data = /var/lib/grafana/data:" ${DESTDIR}/etc/grafana/grafana.ini
|
|
sed -i "s:data/log:/var/log/grafana:" ${DESTDIR}/etc/grafana/grafana.ini
|
|
sed -i "s:data/plugins:/var/lib/grafana/plugins:" ${DESTDIR}/etc/grafana/grafana.ini
|
|
sed -i "s:grafana.db:/var/lib/grafana/grafana.db:" ${DESTDIR}/etc/grafana/grafana.ini
|
|
|
|
# And finally, the service directory
|
|
vsv grafana
|
|
}
|