grafana-bin-4.0.1.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit user
  5. MY_PN=${PN/-bin/}
  6. MY_PV="4.0.1-1480694114"
  7. S=${WORKDIR}/${MY_PN}-${MY_PV}
  8. DESCRIPTION="Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB"
  9. HOMEPAGE="http://grafana.org"
  10. SRC_URI="https://grafanarel.s3.amazonaws.com/builds/${MY_PN}-${MY_PV}.linux-x64.tar.gz -> ${P}.tar.gz"
  11. LICENSE="Apache-2.0"
  12. SLOT="0"
  13. KEYWORDS="~amd64"
  14. IUSE=""
  15. DEPEND=""
  16. RDEPEND="${DEPEND}
  17. >=dev-lang/go-1.5
  18. net-libs/nodejs
  19. "
  20. pkg_setup() {
  21. enewgroup grafana
  22. enewuser grafana -1 -1 /usr/share/grafana grafana
  23. }
  24. src_install() {
  25. keepdir /etc/grafana
  26. insinto /etc/grafana
  27. newins "${S}"/conf/sample.ini grafana.ini
  28. rm "${S}"/conf/sample.ini
  29. # Frontend assets
  30. insinto /usr/share/${MY_PN}
  31. doins -r public conf vendor
  32. dobin bin/grafana-cli
  33. dobin bin/grafana-server
  34. newconfd "${FILESDIR}"/grafana.confd grafana
  35. newinitd "${FILESDIR}"/grafana.initd.2 grafana
  36. keepdir /var/{lib,log}/grafana
  37. fowners grafana:grafana /var/{lib,log}/grafana
  38. fperms 0750 /var/{lib,log}/grafana
  39. }