www-apps/kibana-bin: Version bump bug #562660. By Tomas Mozes.
authorAmy Winston <amynka@gentoo.org>
Thu, 15 Oct 2015 14:50:17 +0000 (16:50 +0200)
committerAmy Winston <amynka@gentoo.org>
Thu, 15 Oct 2015 14:50:17 +0000 (16:50 +0200)
Package-Manager: portage-2.2.20.1

www-apps/kibana-bin/Manifest
www-apps/kibana-bin/files/kibana.confd [new file with mode: 0644]
www-apps/kibana-bin/files/kibana.initd-r2 [new file with mode: 0644]
www-apps/kibana-bin/files/kibana.logrotate [new file with mode: 0644]
www-apps/kibana-bin/kibana-bin-4.1.2.ebuild [new file with mode: 0644]

index e94bca76b59bee963ec1b01ad99908f9753ed4ec..79468cc3185b45538f88ea60d377fe72211b521e 100644 (file)
@@ -1,2 +1,3 @@
 DIST kibana-4.0.3-linux-x64.tar.gz 14331227 SHA256 320a43ed11f8f3f95709ceaec11ef8192c9bc2e64ea73a5f973b43aa8a422922 SHA512 745faffd9d8d67d6322f64223b829eb8eff4fba5d2f435a72b0c52c64e1578f0f5e741285c20904b6215d0c8da2cc5833fead86fc519bb4fdc51e8d51a18c465 WHIRLPOOL 2e67b9ba702ff78b9e775517333739cb96ad7dc88ab413768b897374f5ec25daa3b861f420b54451906231eca0ce5558306613a6597a7c85d340d897da0a0a08
 DIST kibana-4.1.1-linux-x64.tar.gz 11676499 SHA256 6f42d25f337fd49f38e2af81b9ab6e0c987a199a8c0b2e1410d072f812cb4520 SHA512 d72f235704e2a85b4d993f55550b5d8b6de049f05f4ff7781e122af65fca88d3966db188a8bbc877928751aacd69f8ecf4c412cd05bfa88d1a9e785fa952aeed WHIRLPOOL a60321cf7ae511dd03c2099b61ea0fe5abb479b264842150a84d6791e8b9ba6682dc1c95059800a8cf714898350ec533440eb43240fa78491836fa3b7d6ef23d
+DIST kibana-4.1.2-linux-x64.tar.gz 11787239 SHA256 5f6213f7ac7ef71016a6750f09e7316ccc9bca139bc5389b417395b179bc370c SHA512 08e8a8d5582019ee977a43e25afe874cd34fe0097ed17dc4738abaf6493c224061997a2558a297748f53bbee97bcd83b1dc54d0287594ba60d917d19c0baca9b WHIRLPOOL dd537add18d7a01622541850ff7385ec72174f473c6f89d56172a41cc3eac79d49e2df3079fef3160acb6f7c390eae5afb614b14402ebdf21cfba67289fb5142
diff --git a/www-apps/kibana-bin/files/kibana.confd b/www-apps/kibana-bin/files/kibana.confd
new file mode 100644 (file)
index 0000000..59877f3
--- /dev/null
@@ -0,0 +1,2 @@
+#elasticsearch instance to connect to
+ES_INSTANCE=http://localhost:9200
diff --git a/www-apps/kibana-bin/files/kibana.initd-r2 b/www-apps/kibana-bin/files/kibana.initd-r2
new file mode 100644 (file)
index 0000000..85ec76f
--- /dev/null
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+KIBANA_USER=${KIBANA_USER:-kibana}
+
+command="/opt/kibana/bin/kibana"
+command_args="--elasticsearch ${ES_INSTANCE}"
+
+pidfile="/run/kibana.pid"
+command_background="true"
+start_stop_daemon_args="--user=\"${KIBANA_USER}\" --stdout /var/log/kibana/kibana.log --stderr /var/log/kibana/kibana.err"
+
+start_pre() {
+        checkpath -d -o "${KIBANA_USER}" -m750 "/var/log/kibana"
+}
diff --git a/www-apps/kibana-bin/files/kibana.logrotate b/www-apps/kibana-bin/files/kibana.logrotate
new file mode 100644 (file)
index 0000000..378d656
--- /dev/null
@@ -0,0 +1,9 @@
+/var/log/kibana/kibana.log /var/log/kibana/kibana.err {
+        daily
+        rotate 7
+        copytruncate
+        compress
+        delaycompress
+        missingok
+        notifempty
+}
diff --git a/www-apps/kibana-bin/kibana-bin-4.1.2.ebuild b/www-apps/kibana-bin/kibana-bin-4.1.2.ebuild
new file mode 100644 (file)
index 0000000..fdace00
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit user
+
+MY_PN="kibana"
+MY_P=${MY_PN}-${PV/_rc/-rc}
+
+DESCRIPTION="visualize logs and time-stamped data"
+HOMEPAGE="https://www.elastic.co/products/kibana"
+SRC_URI="https://download.elastic.co/${MY_PN}/${MY_PN}/${MY_P}-linux-x64.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND=""
+RDEPEND=""
+
+RESTRICT="strip"
+QA_PREBUILT="opt/kibana/node/bin/node"
+
+S="${WORKDIR}/${MY_P}-linux-x64"
+
+pkg_setup() {
+       enewgroup ${MY_PN}
+       enewuser ${MY_PN} -1 -1 /opt/${MY_PN} ${MY_PN}
+}
+
+src_install() {
+       keepdir /opt/${MY_PN}
+       keepdir /var/log/${MY_PN}
+
+       insinto "/etc/logrotate.d"
+       newins "${FILESDIR}/${MY_PN}.logrotate" "${MY_PN}"
+
+       newconfd "${FILESDIR}/${MY_PN}.confd" "${MY_PN}"
+       newinitd "${FILESDIR}"/kibana.initd-r2 "${MY_PN}"
+
+       mv * "${D}/opt/${MY_PN}"
+}
+
+pkg_postinst() {
+       elog "Be sure to point ES_INSTANCE to your Elasticsearch instance"
+       elog "in /etc/conf.d/${MY_PN}."
+       elog
+       elog "Elasticsearch can run local or remote."
+}