summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/logstash-bin/logstash-bin-5.4.0.ebuild')
-rw-r--r--app-admin/logstash-bin/logstash-bin-5.4.0.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/app-admin/logstash-bin/logstash-bin-5.4.0.ebuild b/app-admin/logstash-bin/logstash-bin-5.4.0.ebuild
new file mode 100644
index 000000000000..f5c4d8c2e292
--- /dev/null
+++ b/app-admin/logstash-bin/logstash-bin-5.4.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user
+
+MY_PN="${PN%-bin}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Tool for managing events and logs"
+HOMEPAGE="https://www.elastic.co/products/logstash"
+SRC_URI="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}.zip"
+
+# source: LICENSE.txt and NOTICE.txt
+LICENSE="Apache-2.0 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="strip"
+QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"
+
+RDEPEND="virtual/jre:1.8"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup ${MY_PN}
+ enewuser ${MY_PN} -1 -1 /var/lib/${MY_PN} ${MY_PN}
+}
+
+src_install() {
+ keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
+ keepdir "/var/log/${MY_PN}"
+
+ insinto "/usr/share/${MY_PN}"
+ newins "${FILESDIR}/agent.conf.sample" agent.conf
+
+ insinto "/opt/${MY_PN}"
+ doins -r .
+ fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby" "/opt/${MY_PN}/bin/logstash-plugin"
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${MY_PN}.logrotate" "${MY_PN}"
+
+ newconfd "${FILESDIR}/${MY_PN}.confd" "${MY_PN}"
+ newinitd "${FILESDIR}/${MY_PN}.initd" "${MY_PN}"
+}
+
+pkg_postinst() {
+ ewarn "The default user changed from root to ${MY_PN}. If you wish to run as root (for"
+ ewarn "example to read local logs), be sure to change LS_USER and LS_GROUP in"
+ ewarn "${EROOT%/}/etc/conf.d/${MY_PN}"
+ einfo
+ einfo "Installing plugins: (bug #601294)"
+ einfo "DEBUG=1 JARS_SKIP='true' bin/logstash-plugin install logstash-output-gelf"
+ einfo
+ einfo "Sample configuration:"
+ einfo "${EROOT%/}/usr/share/${MY_PN}"
+}