1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
11 DESCRIPTION="Analytics and search dashboard for Elasticsearch"
12 HOMEPAGE="https://www.elastic.co/products/kibana"
13 SRC_URI="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}-linux-x86_64.tar.gz"
15 # source: LICENSE.txt and NOTICE.txt
16 LICENSE="Apache-2.0 Artistic-2 BSD BSD-2 CC-BY-3.0 CC-BY-4.0 Elastic-2.0 icu ISC MIT MPL-2.0 OFL-1.1 openssl public-domain Unlicense WTFPL-2 ZLIB"
26 >=net-libs/nodejs-20.15.1
31 # Do not complain about CFLAGS etc since we don't use them
34 opt/kibana/x-pack/plugins/reporting/chromium/headless_shell-linux_x64/headless_shell
35 opt/kibana/x-pack/plugins/reporting/chromium/headless_shell-linux_x64/swiftshader/libEGL.so
36 opt/kibana/x-pack/plugins/reporting/chromium/headless_shell-linux_x64/swiftshader/libGLESv2.so
37 opt/kibana/node_modules/re2/build/Release/re2.node
40 S="${WORKDIR}/${MY_P}-linux-x86_64"
45 # remove unused directory
48 # remove bundled nodejs
50 sed -i 's@\(^NODE="\).*@\1/usr/bin/node"@g' \
53 # move plugins to /var/lib/kibana
56 # handle node.js version with RDEPEND
57 sed -i /node_version_validator/d \
58 src/setup_node_env/no_transpilation_dist.js || die
66 insinto /etc/logrotate.d
67 newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN}
69 newconfd "${FILESDIR}"/${MY_PN}.confd ${MY_PN}
70 newinitd "${FILESDIR}"/${MY_PN}.initd-r1 ${MY_PN}
71 systemd_dounit "${FILESDIR}"/${MY_PN}.service
76 fperms -R +x /opt/${MY_PN}/bin
78 diropts -m 0750 -o ${MY_PN} -g ${MY_PN}
79 keepdir /var/lib/${MY_PN}/plugins
80 keepdir /var/log/${MY_PN}
82 dosym ../../var/lib/kibana/plugins /opt/kibana/plugins
86 elog "This version of Kibana is compatible with Elasticsearch $(ver_cut 1-2) and"
87 elog "Node.js 20. Some plugins may fail with other versions of Node.js (Bug #656008)."
89 elog "To set a customized Elasticsearch instance:"
90 elog " OpenRC: set ES_INSTANCE in /etc/conf.d/${MY_PN}"
91 elog " systemd: set elasticsearch.url in /etc/${MY_PN}/kibana.yml"
93 elog "Elasticsearch can run local or remote."