From 8b1983988028ef59ec7b70c0f9c0b06c4167d975 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Mon, 18 Jun 2018 20:05:52 -0700 Subject: [PATCH] grafana: build missing assets Resolves void-linux/void-packages#205 --- srcpkgs/grafana/template | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template index 6bc8f80bdb7..0e8a89a231b 100644 --- a/srcpkgs/grafana/template +++ b/srcpkgs/grafana/template @@ -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 " 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/