diff options
author | Patrick Lauer <patrick@gentoo.org> | 2016-06-22 12:34:05 +0200 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2016-06-22 12:35:42 +0200 |
commit | 205ce93dbf7723999974f0e8e6e4d6f60147a87a (patch) | |
tree | db5e20bba9e8f1b32ee510cd3b0d3a700a1daeca /www-apps | |
parent | app-office/lyx: version bump 2.1.5 (diff) | |
download | gentoo-205ce93dbf7723999974f0e8e6e4d6f60147a87a.tar.gz gentoo-205ce93dbf7723999974f0e8e6e4d6f60147a87a.tar.bz2 gentoo-205ce93dbf7723999974f0e8e6e4d6f60147a87a.zip |
www-apps/grafana-bin: Initial import, ebuild borrowed from Adjust overlay
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/grafana-bin/Manifest | 1 | ||||
-rw-r--r-- | www-apps/grafana-bin/files/grafana.confd | 7 | ||||
-rw-r--r-- | www-apps/grafana-bin/files/grafana.initd | 34 | ||||
-rw-r--r-- | www-apps/grafana-bin/grafana-bin-3.0.4.ebuild | 51 | ||||
-rw-r--r-- | www-apps/grafana-bin/metadata.xml | 7 |
5 files changed, 100 insertions, 0 deletions
diff --git a/www-apps/grafana-bin/Manifest b/www-apps/grafana-bin/Manifest new file mode 100644 index 000000000000..ada2638fac23 --- /dev/null +++ b/www-apps/grafana-bin/Manifest @@ -0,0 +1 @@ +DIST grafana-bin-3.0.4.tar.gz 40460699 SHA256 ec5581d055bb67abac3007457a30869bca263c151264011cf0c9ce086c5329df SHA512 eca12381e5aec14ba40e0821a3e46a169f789f7d7d00c89db2ef1d7db1a770a09906d144515cfac72d5b1bff72a18f9ad71316439ea33240ccefcd859752a916 WHIRLPOOL fa48e9f6b4792cc3f1d6123d624d4404a7283aee9dca8b59ce524fd02db6de9120607d0bb04eae052d56f0cd416e46b67a7cbb212cb64994b2d78e281ba88d5f diff --git a/www-apps/grafana-bin/files/grafana.confd b/www-apps/grafana-bin/files/grafana.confd new file mode 100644 index 000000000000..207ef765f653 --- /dev/null +++ b/www-apps/grafana-bin/files/grafana.confd @@ -0,0 +1,7 @@ +# Config file for /etc/init.d/grafana + +# The user to run your application as. +GRAFANA_USER=grafana + +# The group to run your application as. +GRAFANA_GROUP=grafana diff --git a/www-apps/grafana-bin/files/grafana.initd b/www-apps/grafana-bin/files/grafana.initd new file mode 100644 index 000000000000..ecbd2e22d814 --- /dev/null +++ b/www-apps/grafana-bin/files/grafana.initd @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need localmount +} + +start() { + ebegin "Starting grafana server" + + start-stop-daemon --start -b \ + --chdir /usr/share/grafana \ + --user ${GRAFANA_USER}:${GRAFANA_GROUP} \ + --exec /usr/bin/grafana-server -- \ + -pidfile=/run/grafana.pid \ + -config=/etc/grafana/grafana.ini \ + cfg:default.paths.data=/var/lib/grafana \ + cfg:default.paths.logs=/var/log/grafana + + eend $? +} + +stop() { + ebegin "Stopping grafana server" + + start-stop-daemon --stop \ + --pidfile /run/grafana.pid \ + --user "${GRAFANA_USER}" \ + --retry=TERM/20/KILL/5 + + eend $? +} diff --git a/www-apps/grafana-bin/grafana-bin-3.0.4.ebuild b/www-apps/grafana-bin/grafana-bin-3.0.4.ebuild new file mode 100644 index 000000000000..4b2e8abf73f0 --- /dev/null +++ b/www-apps/grafana-bin/grafana-bin-3.0.4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user +MY_PN=${PN/-bin/} +MY_PV="3.0.4-1464167696" +S=${WORKDIR}/${MY_PN}-${MY_PV} + +DESCRIPTION="Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB" +HOMEPAGE="http://grafana.org" +SRC_URI="https://grafanarel.s3.amazonaws.com/builds/${MY_PN}-${MY_PV}.linux-x64.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND} + >=dev-lang/go-1.5 + net-libs/nodejs +" + +pkg_setup() { + enewgroup grafana + enewuser grafana -1 -1 /usr/share/grafana grafana +} + +src_install() { + keepdir /etc/grafana + insinto /etc/grafana + newins "${S}"/conf/sample.ini grafana.ini + rm "${S}"/conf/sample.ini + + # Frontend assets + insinto /usr/share/${MY_PN} + doins -r public conf vendor + + dobin bin/grafana-cli + dobin bin/grafana-server + + newconfd "${FILESDIR}"/grafana.confd grafana + newinitd "${FILESDIR}"/grafana.initd grafana + + keepdir /var/{lib,log}/grafana + fowners grafana:grafana /var/{lib,log}/grafana + fperms 0750 /var/{lib,log}/grafana +} diff --git a/www-apps/grafana-bin/metadata.xml b/www-apps/grafana-bin/metadata.xml new file mode 100644 index 000000000000..8c5a5301197b --- /dev/null +++ b/www-apps/grafana-bin/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + </maintainer> +</pkgmetadata> |