grafana: build missing assets

Resolves void-linux/void-packages#205
This commit is contained in:
Michael Aldridge 2018-06-18 20:05:52 -07:00
parent fceed4b8e9
commit 8b19839880
1 changed files with 10 additions and 3 deletions

View File

@ -1,11 +1,12 @@
# Template file for 'grafana'
pkgname=grafana
version=5.1.3
revision=1
revision=2
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"
hostmakedepends="nodejs-lts yarn"
maintainer="Michael Aldridge <maldridge@VoidLinux.eu>"
license="Apache-2.0"
homepage="https://grafana.com"
@ -17,14 +18,20 @@ _grafana_homedir="/var/lib/grafana"
conf_files="/etc/grafana/grafana.ini"
pre_build() {
yarn install --pure-lockfile
}
post_build() {
yarn run build
}
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/