1 |
commit: 712d3d3706f682c0f64895d2d2a17d5486093007 |
2 |
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Sep 17 10:47:56 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 28 09:44:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=712d3d37 |
7 |
|
8 |
www-apps/kibana-bin: allow using newer node.js version |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/9892 |
11 |
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com> |
12 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
13 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
14 |
|
15 |
www-apps/kibana-bin/kibana-bin-6.4.0-r1.ebuild | 74 ++++++++++++++++++++++++++ |
16 |
1 file changed, 74 insertions(+) |
17 |
|
18 |
diff --git a/www-apps/kibana-bin/kibana-bin-6.4.0-r1.ebuild b/www-apps/kibana-bin/kibana-bin-6.4.0-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..fda8f3b78d7 |
21 |
--- /dev/null |
22 |
+++ b/www-apps/kibana-bin/kibana-bin-6.4.0-r1.ebuild |
23 |
@@ -0,0 +1,74 @@ |
24 |
+# Copyright 1999-2018 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+inherit systemd user |
30 |
+ |
31 |
+MY_PN="${PN%-bin}" |
32 |
+MY_P=${MY_PN}-${PV} |
33 |
+ |
34 |
+DESCRIPTION="Analytics and search dashboard for Elasticsearch" |
35 |
+HOMEPAGE="https://www.elastic.co/products/kibana" |
36 |
+SRC_URI="x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}-linux-x86_64.tar.gz ) |
37 |
+ !x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_PN}-oss-${PV}-linux-x86_64.tar.gz )" |
38 |
+ |
39 |
+# source: LICENSE.txt and NOTICE.txt |
40 |
+LICENSE="Apache-2.0 Artistic-2 BSD BSD-2 CC-BY-3.0 CC-BY-4.0 icu ISC MIT MPL-2.0 OFL-1.1 openssl public-domain Unlicense WTFPL-2 ZLIB x-pack? ( Elastic )" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64" |
43 |
+IUSE="x-pack" |
44 |
+ |
45 |
+RDEPEND=">=net-libs/nodejs-8.11.4" |
46 |
+ |
47 |
+S="${WORKDIR}/${MY_P}-linux-x86_64" |
48 |
+ |
49 |
+pkg_setup() { |
50 |
+ enewgroup ${MY_PN} |
51 |
+ enewuser ${MY_PN} -1 -1 /opt/${MY_PN} ${MY_PN} |
52 |
+} |
53 |
+ |
54 |
+src_prepare() { |
55 |
+ default |
56 |
+ |
57 |
+ # remove bundled nodejs |
58 |
+ rm -r node || die |
59 |
+ |
60 |
+ # remove empty unused directory |
61 |
+ rmdir data || die |
62 |
+ |
63 |
+ # handle node.js version with RDEPEND |
64 |
+ sed -i /node_version_validator/d src/setup_node_env/index.js || die |
65 |
+} |
66 |
+ |
67 |
+src_install() { |
68 |
+ insinto /etc/${MY_PN} |
69 |
+ doins -r config/. |
70 |
+ rm -r config || die |
71 |
+ |
72 |
+ insinto /etc/logrotate.d |
73 |
+ newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN} |
74 |
+ |
75 |
+ newconfd "${FILESDIR}"/${MY_PN}.confd ${MY_PN} |
76 |
+ newinitd "${FILESDIR}"/${MY_PN}.initd ${MY_PN} |
77 |
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service |
78 |
+ |
79 |
+ insinto /opt/${MY_PN} |
80 |
+ doins -r . |
81 |
+ |
82 |
+ fperms -R +x /opt/${MY_PN}/bin |
83 |
+ |
84 |
+ diropts -m 0750 -o ${MY_PN} -g ${MY_PN} |
85 |
+ keepdir /var/log/${MY_PN} |
86 |
+} |
87 |
+ |
88 |
+pkg_postinst() { |
89 |
+ elog "This version of Kibana is compatible with Elasticsearch $(ver_cut 1-2) and" |
90 |
+ elog "Node.js 8. Some plugins may fail with other versions of Node.js (Bug #656008)." |
91 |
+ elog |
92 |
+ elog "To set a customized Elasticsearch instance:" |
93 |
+ elog " OpenRC: set ES_INSTANCE in /etc/conf.d/${MY_PN}" |
94 |
+ elog " systemd: set elasticsearch.url in /etc/${MY_PN}/kibana.yml" |
95 |
+ elog |
96 |
+ elog "Elasticsearch can run local or remote." |
97 |
+} |