kibana-bin-5.2.2.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit pax-utils user
  5. MY_PN="${PN%-bin}"
  6. MY_P=${MY_PN}-${PV}
  7. DESCRIPTION="Explore and visualize data"
  8. HOMEPAGE="https://www.elastic.co/products/kibana"
  9. SRC_URI="amd64? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}-linux-x86_64.tar.gz )
  10. x86? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}-linux-x86.tar.gz )"
  11. LICENSE="Apache-2.0"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. RESTRICT="strip"
  15. QA_PREBUILT="opt/kibana/node/bin/node"
  16. pkg_setup() {
  17. enewgroup ${MY_PN}
  18. enewuser ${MY_PN} -1 -1 /opt/${MY_PN} ${MY_PN}
  19. }
  20. src_unpack() {
  21. if use amd64; then
  22. S="${WORKDIR}/${MY_P}-linux-x86_64"
  23. elif use x86; then
  24. S="${WORKDIR}/${MY_P}-linux-x86"
  25. fi
  26. default
  27. }
  28. src_install() {
  29. keepdir /opt/${MY_PN}
  30. keepdir /var/log/${MY_PN}
  31. keepdir /etc/${MY_PN}
  32. insinto /etc/${MY_PN}
  33. doins config/*
  34. rm -rf config || die
  35. insinto /etc/logrotate.d
  36. newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN}
  37. newconfd "${FILESDIR}"/${MY_PN}.confd ${MY_PN}
  38. newinitd "${FILESDIR}"/${MY_PN}.initd-r4 ${MY_PN}
  39. mv * "${ED%/}"/opt/${MY_PN} || die
  40. # bug 567934
  41. pax-mark m "${ED%/}/opt/${MY_PN}/node/bin/node"
  42. }
  43. pkg_postinst() {
  44. elog "This version of Kibana is compatible with Elasticsearch 5.2"
  45. elog
  46. elog "Be sure to point ES_INSTANCE to your Elasticsearch instance"
  47. elog "in /etc/conf.d/${MY_PN}."
  48. elog
  49. elog "Elasticsearch can run local or remote."
  50. }