summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mozes <hydrapolic@gmail.com>2017-03-06 13:05:29 +0100
committerTony Vroon <chainsaw@gentoo.org>2017-03-31 09:07:15 +0100
commitf8cf866692867678de7c776c58cef2bf21eaa77d (patch)
treed3afc9a5a0dc606e7bf3e11c9d650e2d20040edd /app-admin/graylog2/graylog2-2.2.2.ebuild
parentnet-analyzer/nagios-check_logfiles: ppc64 stable (bug 614316). (diff)
downloadgentoo-f8cf866692867678de7c776c58cef2bf21eaa77d.tar.gz
gentoo-f8cf866692867678de7c776c58cef2bf21eaa77d.tar.bz2
gentoo-f8cf866692867678de7c776c58cef2bf21eaa77d.zip
app-admin/graylog2: bump to 2.2.2
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-admin/graylog2/graylog2-2.2.2.ebuild')
-rw-r--r--app-admin/graylog2/graylog2-2.2.2.ebuild87
1 files changed, 87 insertions, 0 deletions
diff --git a/app-admin/graylog2/graylog2-2.2.2.ebuild b/app-admin/graylog2/graylog2-2.2.2.ebuild
new file mode 100644
index 000000000000..b61f58667285
--- /dev/null
+++ b/app-admin/graylog2/graylog2-2.2.2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user
+
+DESCRIPTION="Free and open source log management"
+HOMEPAGE="https://graylog.org"
+SRC_URI="https://packages.graylog2.org/releases/graylog/graylog-${PV}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+MY_PN="graylog"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+INSTALL_DIR="/usr/share/graylog2"
+DATA_DIR="/var/lib/graylog2"
+
+QA_PREBUILT="${INSTALL_DIR}/lib/sigar/libsigar*"
+RESTRICT="strip"
+
+RDEPEND="virtual/jdk:1.8"
+
+pkg_setup() {
+ enewgroup graylog
+ enewuser graylog -1 -1 -1 graylog
+}
+
+src_prepare() {
+ default
+
+ # graylogctl is replaced by our own initd
+ rm -r bin
+
+ # Stick to architecture of build host
+ if ! use amd64; then
+ rm -r lib/sigar/libsigar-amd64-*.so || die "Failed in removing AMD64 support libraries"
+ fi
+ if ! use ppc64; then
+ rm -r lib/sigar/libsigar-ppc64-*.so || die "Failed in removing PPC64 support libraries"
+ fi
+ if ! use x86; then
+ rm -r lib/sigar/libsigar-x86-*.so || die "Failed in removing X86 support libraries"
+ fi
+ # Currently unsupported platforms
+ # QA warning galore but testing/patches welcome
+ rm lib/sigar/libsigar-*freebsd*so \
+ lib/sigar/libsigar-*solaris*so \
+ lib/sigar/libsigar-*hpux*.sl \
+ lib/sigar/libsigar-*macosx*.dylib \
+ lib/sigar/libsigar-ia64-*.so \
+ lib/sigar/libsigar-ppc-*.so \
+ lib/sigar/libsigar-s390x*.so \
+ lib/sigar/*winnt* || die "Failed in removing unsupported platform libraries"
+
+ # remove plugins
+ rm plugin/graylog-plugin-anonymous-usage-statistics-${PV}.jar || die
+
+ # gentoo specific paths
+ sed -i "s@\(node_id_file = \).*@\1${DATA_DIR}/node-id@g; \
+ s@\(message_journal_dir = \).*@\1${DATA_DIR}/data/journal@g; \
+ s@#\(content_packs_dir = \).*@\1/${DATA_DIR}/data/contentpacks@g" \
+ graylog.conf.example || die
+}
+
+src_compile() {
+ einfo "Nothing to compile; upstream supplies JAR only"
+}
+
+src_install() {
+ insinto /etc/graylog2
+ doins graylog.conf.example
+
+ insinto ${DATA_DIR}/data/contentpacks
+ doins data/contentpacks/grok-patterns.json
+
+ insinto "${INSTALL_DIR}"
+ doins *
+
+ doins -r lib plugin
+
+ newinitd "${FILESDIR}/initd-r1" graylog2
+ newconfd "${FILESDIR}/confd-r1" graylog2
+}