summaryrefslogtreecommitdiff
path: root/app-admin/prelude-manager
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/prelude-manager
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/prelude-manager')
-rw-r--r--app-admin/prelude-manager/Manifest14
-rw-r--r--app-admin/prelude-manager/files/prelude-manager-3.0.0-conf.patch11
-rw-r--r--app-admin/prelude-manager/files/prelude-manager-3.0.0-configure.patch57
-rw-r--r--app-admin/prelude-manager/files/prelude-manager-3.0.0-run.patch13
-rw-r--r--app-admin/prelude-manager/files/prelude-manager-3.1.0-run.patch13
-rw-r--r--app-admin/prelude-manager/files/prelude-manager.initd25
-rw-r--r--app-admin/prelude-manager/files/prelude-manager.run4
-rw-r--r--app-admin/prelude-manager/files/prelude-manager.service14
-rw-r--r--app-admin/prelude-manager/metadata.xml28
-rw-r--r--app-admin/prelude-manager/prelude-manager-3.0.0.ebuild62
-rw-r--r--app-admin/prelude-manager/prelude-manager-3.1.0.ebuild58
-rw-r--r--app-admin/prelude-manager/prelude-manager-4.0.0.ebuild58
12 files changed, 357 insertions, 0 deletions
diff --git a/app-admin/prelude-manager/Manifest b/app-admin/prelude-manager/Manifest
new file mode 100644
index 000000000000..dbb263404759
--- /dev/null
+++ b/app-admin/prelude-manager/Manifest
@@ -0,0 +1,14 @@
+AUX prelude-manager-3.0.0-conf.patch 479 BLAKE2B dce40c09a9ca4cae0ba962463b86afd130700e56026eeef26ce232d72ccf77b6effbcaf14029837e388fbe859ac274fbaa6cd884a2ed1aecae55aa5e679b051d SHA512 085f46e905e5c4d0d838f11e4cd8462ede754c5009c69c623c841528dc204082ef08d18696f52eec1d220060d7ce3e5007079ebe918465fd797a5e76f68725bf
+AUX prelude-manager-3.0.0-configure.patch 2683 BLAKE2B 90db4c3c49e988c28c61ccd5c8811f53093862c2199318347bac9eb0901a05afe8846cd52403e45c74e1ae7259908078713e148d772f51d0654e4fe1a07e2a74 SHA512 41dc4eb1ece15d42a21e6da611b4b8bb855b7c7fb1f75621499dc0ad33043e8f08ebadd4402855e850a2b603bc71fbbee09682c9ef40fda51b31d15038180099
+AUX prelude-manager-3.0.0-run.patch 552 BLAKE2B b11803cab6cf01d1501759c3c7a759ebc7f6bcb806d6e2330a826ce4117bb285e35a8519ea260892cb16124dce3115d9a506a68ffceae304fd41f0e49a5877c7 SHA512 2442f6e1436ef3cf9a2b572ca0c4402a67109555e56fb51355d3187386b2be69644d95b7f6e42264a2fce7db92f3d7e1274ead9c6a283f80ace040359afab88b
+AUX prelude-manager-3.1.0-run.patch 570 BLAKE2B 9690826651d7a747d282cdc1591ad1ac2fadfa791b38e0ea09eea8bc2efae56e55bcd5b127087f94876982009a7821dd8f91b910ac8ab0b52ba1b7c8d75153e2 SHA512 6e8d59b49de65c00abf756c823acb43d65af065bae363f83c3f8d9b6b8743b6a449f517d129cd7d98054ded94faccf33d29e1570462e73ffd51d070da0d081c5
+AUX prelude-manager.initd 591 BLAKE2B 495b56179aedd0ec3c925d6e269c9d114d9fc5ef968aa9b1c10736ea1ffeb2a4895222e282627a186b248faf4e71808e548cb9cc24b2a645dfcf3d70072cc1f1 SHA512 0115c313fd1e964508951a9074aeb9cd5b63a14d2a63d5f205dd141d22b806955c1852d9291945725dc6d9474210700edaeb444962fd7e2f673a7adf51a8c902
+AUX prelude-manager.run 133 BLAKE2B b91c630c269ff09327da88cbcaaca6108121a5ae16d499a889a2cdb7e6dd7b844b3c89799fa60cb71deb9609210abbb08b059f9fbef2def7d06c7ce506225c19 SHA512 f129cc45efb710d336dd177ba465f542aaac767579dafbbacbdc88b56fcf3b95eb219a9dff7863ca47475748b93d001218ff28a7e49b3060c62278a72666986e
+AUX prelude-manager.service 398 BLAKE2B b409fd283baa3d85c0b25149e2912483e29f090338cc659c3444e2f51ca228b50cf2d5172ecf85b16a40c50f515def2ed178c6a2d85caeaa8b7b75b5ac5ddf45 SHA512 b3700ef920e739f521c87477a8752f787345971cd7077a4a0722b3d4069ca2ba55df3db87da4b544f559cd2e4faf2ef3b068e1c5dead6003f580dc04b4590495
+DIST prelude-manager-3.0.0.tar.gz 1286459 BLAKE2B 0909b0d7501909de51cd580b6ce22a66b1900a3b5b7376d3aeb4136bf41128ab766a025d69d33c414a9623dabb0de144e2f21190c3c3cccb9c067db359aab1bd SHA512 4c16a353495179265375686ce9592c8cd044b4255060b78286466bd25f9b38634233c95af058e1c0b81e1b574ec9ada5b2db92d6d1f5594dfcddce572fd0fd67
+DIST prelude-manager-3.1.0.tar.gz 1301799 BLAKE2B 938937d2752ad47630b36c3a546f2493a964fde01e3df694e4a9fbddfa1efc3ddc9d864f8c1169e8ae8f3b414c4cd1983bbbd015f192ee065e2531489a23ba8b SHA512 75df43f9db81d2b6bd87c649eda7bb30ee10510576473bea83cb5cce44f576e9d69d775b5d76dcea8841eee61730a97cdae51e6c8b3a426d2442c5183d0e0d10
+DIST prelude-manager-4.0.0.tar.gz 1353116 BLAKE2B 20aaa28797a67fd310807735bb08f0c21c3bd95950598a86c45144ee2474785aef0c7d569732c817509ae8ae52ffce5f43f3c071931f2960578681f91a8c9504 SHA512 793ed37c71eb4884cbbb49b11c7388ee291a35252255458ceadb4ce10d1392e8bad423f95e31bff4550a9cf1d04139e43729352554fd847048b6c8d14f813a8a
+EBUILD prelude-manager-3.0.0.ebuild 1349 BLAKE2B 1e57326c02b41d39ed7cf9ef7372dffd8ed0357e1d390b73e2f143460c2d7dc907bd4d9086c351b5b69f4a9f5a7d18890a3de8774a427691e56d660bd5a21dac SHA512 404cd27a552a6eb9bc8ae005ddacd9734f26f52897f7d9a21568b7cb2ba1cfe82a5a9cda32f591043c65124faf5322d0dcff95b1b0cca5cb60c75331c3e8b322
+EBUILD prelude-manager-3.1.0.ebuild 1235 BLAKE2B 131b01c6315a1bf7fc411dde32dede5278a7d8da4e1dc62f9df106b94669df5d0e7ddcc1d367be3a5979e89c2aa71b2bc1b01eef9f9512a6b7d5654b3d965ea0 SHA512 280a181934c56049823297b749b4b0de5f1f819e1c057f910bd208cbb5ebb8928a17d70969e32768ac7e6be624e314607f1b11fdba8daa375a12df443dc1a28a
+EBUILD prelude-manager-4.0.0.ebuild 1253 BLAKE2B 8d9e17b92b16090bb437fe53389598128f249e2b4f16c8da6724f370df5bab1aea34c1824b024839bc0f3a573a56d19bc54c31cdf0744b54c581fcdefeb76d97 SHA512 3a0d79d24de4d97ba73be7cdf62f4d2d158225cdf35945e51de3854b7465a23eddc9315204a303c833e73a8965826ea18cf09951aa79697bfdc9523f0149025f
+MISC metadata.xml 1037 BLAKE2B 2e4a2d969eac348834aa8f78859b7b4456585ab11985c6083640a6cc0d32269952a78063b5aa11c6228d9c67e04b50b58247b5c2787f7d484390721af0de4ef5 SHA512 d18f203c6feadc632fee701cc7563c60d10febf11873fd9a6498cdaa47c2fa44b1a7ca50d5f6af99f3cc678fb88442c8e71d7eb0185b9972585c2d52371d9c34
diff --git a/app-admin/prelude-manager/files/prelude-manager-3.0.0-conf.patch b/app-admin/prelude-manager/files/prelude-manager-3.0.0-conf.patch
new file mode 100644
index 000000000000..246ce7d921e5
--- /dev/null
+++ b/app-admin/prelude-manager/files/prelude-manager-3.0.0-conf.patch
@@ -0,0 +1,11 @@
+--- a/prelude-manager.conf.in
++++ b/prelude-manager.conf.in
+@@ -361,7 +361,7 @@
+ # (same source, target and classification combination) every 2 minutes
+ # to reporting plugins (eg. to the database).
+ [thresholding]
+-path = alert.classification.text, alert.source.node.address.address, alert.target.node.address.address
++path = alert.classification.text, alert.source(0).node.address(0).address, alert.target(0).node.address(0).address
+ limit = 120
+ count = 100
+ hook = reporting
diff --git a/app-admin/prelude-manager/files/prelude-manager-3.0.0-configure.patch b/app-admin/prelude-manager/files/prelude-manager-3.0.0-configure.patch
new file mode 100644
index 000000000000..bc1949f01510
--- /dev/null
+++ b/app-admin/prelude-manager/files/prelude-manager-3.0.0-configure.patch
@@ -0,0 +1,57 @@
+When : when you try to use enable with libmaxmind, libpreludedb, xml, libwrap, they are not working
+Why : Needed if you want to use useflags
+--- a/configure.in
++++ b/configure.in
+@@ -110,7 +110,10 @@
+ dnl **************************************************
+ LIBMAXMINDDB_MIN_VERSION=1.0.0
+
+-PKG_CHECK_MODULES([LIBMAXMINDDB], [libmaxminddb >= $LIBMAXMINDDB_MIN_VERSION], enable_libmaxminddb=yes, enable_libmaxminddb=no)
++AC_ARG_ENABLE(libmaxminddb, AC_HELP_STRING(--enable-libmaxminddb, Define whether libmaxminddb is available), , enable_libmaxminddb="yes")
++if test x$enable_libmaxminddb = xyes; then
++ PKG_CHECK_MODULES([LIBMAXMINDDB], [libmaxminddb >= $LIBMAXMINDDB_MIN_VERSION], enable_libmaxminddb=yes, enable_libmaxminddb=no)
++fi
+ if test x$enable_libmaxminddb = xyes; then
+ AC_CHECK_HEADER(maxminddb.h, enable_libmaxminddb=yes, enable_libmaxminddb=no)
+ fi
+@@ -126,11 +129,14 @@
+ dnl * Check for libpreludedb *
+ dnl **************************************************
+
+-AM_PATH_LIBPRELUDEDB(3.0.0, enable_libpreludedb=yes, enable_libpreludedb=no, no)
+-AM_CONDITIONAL(HAVE_LIBPRELUDEDB, test x$enable_libpreludedb = xyes)
++AC_ARG_ENABLE(libpreludedb, AC_HELP_STRING(--enable-libpreludedb, Define whether libpreludedb is available), , enable_libpreludedb="yes")
++if test x$enable_libpreludedb = xyes; then
++ AM_PATH_LIBPRELUDEDB(3.0.0, enable_libpreludedb=yes, enable_libpreludedb=no, no)
++fi
+ if test x$enable_libpreludedb = xyes; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBPRELUDEDB, , Define whether libpreludedb is available)
+ fi
++AM_CONDITIONAL(HAVE_LIBPRELUDEDB, test x$enable_libpreludedb = xyes)
+
+
+
+@@ -138,7 +144,10 @@
+ dnl * Check for the Libxml2 *
+ dnl ********************************************************
+
+-AM_PATH_XML2(, enable_xmlmod=yes, enable_xmlmod=no)
++AC_ARG_ENABLE(xmlmod, AC_HELP_STRING(--enable-xmlmod, Enable XML), , enable_xmlmod="yes")
++if test x$enable_xmlmod = xyes; then
++ AM_PATH_XML2(, enable_xmlmod=yes, enable_xmlmod=no)
++fi
+ AM_CONDITIONAL(HAVE_XML2, test x$enable_xmlmod = xyes)
+
+
+@@ -147,9 +156,10 @@
+ dnl * TCP WRAPPER CHECK *
+ dnl **************************************************
+
++AC_ARG_WITH(libwrap, AC_HELP_STRING(--with-libwrap, Compile in libwrap (tcp_wrappers) support.), , with_libwrap="yes")
+ AC_ARG_WITH(libwrap-prefix, AC_HELP_STRING(--with-libwrap-prefix@<:@=PFX@:>@,
+ Compile in libwrap (tcp_wrappers) support @<:@default=auto@:>@.),
+- libwrap_required=true, with_libwrap="yes")
++ libwrap_required=true, )
+
+ if test x$with_libwrap != xno; then
+ LIBWRAP_INCLUDE="tcpd.h"
diff --git a/app-admin/prelude-manager/files/prelude-manager-3.0.0-run.patch b/app-admin/prelude-manager/files/prelude-manager-3.0.0-run.patch
new file mode 100644
index 000000000000..ef6d553a3d27
--- /dev/null
+++ b/app-admin/prelude-manager/files/prelude-manager-3.0.0-run.patch
@@ -0,0 +1,13 @@
+When : everytime
+Why : since systemd, run dir has changed
+--- a/configure.in
++++ b/configure.in
+@@ -304,7 +304,7 @@
+
+ manager_failover_dir=$LOCALSTATEDIR/spool/prelude-manager/failover
+ manager_scheduler_dir=$LOCALSTATEDIR/spool/prelude-manager/scheduler
+-manager_run_dir=$LOCALSTATEDIR/run/prelude-manager
++manager_run_dir=/run/prelude-manager
+
+ AC_DEFINE_UNQUOTED(REPORT_PLUGIN_DIR, "$report_plugin_dir", Prelude-Manager report plugin directory)
+ AC_DEFINE_UNQUOTED(DECODE_PLUGIN_DIR, "$decode_plugin_dir", Prelude-Manager decode plugin directory)
diff --git a/app-admin/prelude-manager/files/prelude-manager-3.1.0-run.patch b/app-admin/prelude-manager/files/prelude-manager-3.1.0-run.patch
new file mode 100644
index 000000000000..4012c6c4b794
--- /dev/null
+++ b/app-admin/prelude-manager/files/prelude-manager-3.1.0-run.patch
@@ -0,0 +1,13 @@
+When : everytime
+Why : Fix the run dir to comply with the Gentoo FS layout.
+--- a/configure.ac
++++ b/configure.ac
+@@ -337,7 +337,7 @@
+
+ manager_failover_dir=$LOCALSTATEDIR/spool/prelude-manager/failover
+ manager_scheduler_dir=$LOCALSTATEDIR/spool/prelude-manager/scheduler
+-manager_run_dir=$LOCALSTATEDIR/run/prelude-manager
++manager_run_dir=/run/prelude-manager
+
+ AC_DEFINE_UNQUOTED(REPORT_PLUGIN_DIR, "$report_plugin_dir", Prelude-Manager report plugin directory)
+ AC_DEFINE_UNQUOTED(DECODE_PLUGIN_DIR, "$decode_plugin_dir", Prelude-Manager decode plugin directory)
diff --git a/app-admin/prelude-manager/files/prelude-manager.initd b/app-admin/prelude-manager/files/prelude-manager.initd
new file mode 100644
index 000000000000..14a39ba415e8
--- /dev/null
+++ b/app-admin/prelude-manager/files/prelude-manager.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+BIN_MANAGER=/usr/bin/prelude-manager
+PID_MANAGER=/run/prelude-manager/prelude-manager.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting prelude-manager"
+ checkpath -d -m 0755 -o root:root /run/prelude-manager
+ start-stop-daemon --start --exec $BIN_MANAGER \
+ --pidfile $PID_MANAGER -- -d -P $PID_MANAGER
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping prelude-manager"
+ start-stop-daemon --stop --exec $BIN_MANAGER \
+ --pidfile $PID_MANAGER
+ eend $?
+}
diff --git a/app-admin/prelude-manager/files/prelude-manager.run b/app-admin/prelude-manager/files/prelude-manager.run
new file mode 100644
index 000000000000..739808485129
--- /dev/null
+++ b/app-admin/prelude-manager/files/prelude-manager.run
@@ -0,0 +1,4 @@
+# Configuration to create /run/prelude-manager directory
+# Used as part of systemd's tmpfiles
+
+d /run/prelude-manager 0755 root root
diff --git a/app-admin/prelude-manager/files/prelude-manager.service b/app-admin/prelude-manager/files/prelude-manager.service
new file mode 100644
index 000000000000..15eee91b8aa7
--- /dev/null
+++ b/app-admin/prelude-manager/files/prelude-manager.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Prelude-Manager service
+DefaultDependencies=no
+After=remote_fs.target
+Before=prelude-lml.service prelude-correlator.service
+
+[Service]
+ExecStart=/usr/bin/prelude-manager -d -P /run/prelude-manager/prelude-manager.pid
+Type=forking
+PIDFile=/run/prelude-manager/prelude-manager.pid
+Restart=always
+
+[Install]
+WantedBy=prelude-lml.service prelude-correlator.service multi-user.target
diff --git a/app-admin/prelude-manager/metadata.xml b/app-admin/prelude-manager/metadata.xml
new file mode 100644
index 000000000000..5990a2a5fbd3
--- /dev/null
+++ b/app-admin/prelude-manager/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>thomas.andrejak@gmail.com</email>
+ <name>Thomas Andrejak</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Prelude-Manager is a high availability server that
+ accepts secured connections from distributed sensors
+ and saves received events to a media specified by the user
+ (database, log file, mail etc.). The server schedules and
+ establishes the priorities of treatment according to the
+ critical character and the source of the alerts.
+ </longdescription>
+ <use>
+ <flag name="tcpwrapper">Enables Prelude Manager using
+ tcp wrapper. It requires <pkg>sys-apps/tcp-wrappers</pkg>
+ .</flag>
+ <flag name="dbx">Enables Prelude Manager storing Prelude
+ alerts into database through <pkg>dev-libs/libpreludedb</pkg>
+ .</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-admin/prelude-manager/prelude-manager-3.0.0.ebuild b/app-admin/prelude-manager/prelude-manager-3.0.0.ebuild
new file mode 100644
index 000000000000..c9aec56bed73
--- /dev/null
+++ b/app-admin/prelude-manager/prelude-manager-3.0.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils systemd
+
+DESCRIPTION="Bus communication for all Prelude modules"
+HOMEPAGE="https://www.prelude-siem.org"
+SRC_URI="https://www.prelude-siem.org/pkg/src/3.0.0/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tcpwrapper xml geoip dbx"
+
+RDEPEND="net-libs/gnutls
+ dev-libs/libprelude
+ dbx? ( dev-libs/libpreludedb )
+ tcpwrapper? ( sys-apps/tcp-wrappers )
+ xml? ( dev-libs/libxml2 )
+ geoip? ( dev-libs/libmaxminddb )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-conf.patch"
+ "${FILESDIR}/${P}-configure.patch"
+ "${FILESDIR}/${P}-run.patch"
+)
+
+src_prepare() {
+ default_src_prepare
+
+ mv "${S}/configure.in" "${S}/configure.ac" || die "mv failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ $(use_enable dbx libpreludedb) \
+ $(use_with tcpwrapper libwrap) \
+ $(use_enable xml xmlmod) \
+ $(use_enable geoip libmaxminddb)
+}
+
+src_install() {
+ default_src_install
+
+ rm -rv "${D}/run" || die "rm failed"
+ keepdir /var/spool/prelude-manager{,/failover,/scheduler}
+
+ prune_libtool_files --modules
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf"
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+}
diff --git a/app-admin/prelude-manager/prelude-manager-3.1.0.ebuild b/app-admin/prelude-manager/prelude-manager-3.1.0.ebuild
new file mode 100644
index 000000000000..45047c38dbc8
--- /dev/null
+++ b/app-admin/prelude-manager/prelude-manager-3.1.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd
+
+DESCRIPTION="Bus communication for all Prelude modules"
+HOMEPAGE="https://www.prelude-siem.org"
+SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tcpwrapper xml geoip dbx"
+
+RDEPEND="net-libs/gnutls:=
+ ~dev-libs/libprelude-${PV}
+ dbx? ( ~dev-libs/libpreludedb-${PV} )
+ tcpwrapper? ( sys-apps/tcp-wrappers )
+ xml? ( dev-libs/libxml2 )
+ geoip? ( dev-libs/libmaxminddb )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-run.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_with dbx libpreludedb-prefix) \
+ $(use_with tcpwrapper libwrap) \
+ $(use_with xml xml-prefix) \
+ $(use_enable geoip libmaxminddb)
+}
+
+src_install() {
+ default
+
+ rm -rv "${ED%/}/run" || die "rm failed"
+ keepdir /var/spool/prelude-manager{,/failover,/scheduler}
+
+ find "${D}" -name '*.la' -delete || die
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf"
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+}
diff --git a/app-admin/prelude-manager/prelude-manager-4.0.0.ebuild b/app-admin/prelude-manager/prelude-manager-4.0.0.ebuild
new file mode 100644
index 000000000000..30855a48ed97
--- /dev/null
+++ b/app-admin/prelude-manager/prelude-manager-4.0.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd
+
+DESCRIPTION="Bus communication for all Prelude modules"
+HOMEPAGE="https://www.prelude-siem.org"
+SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dbx geoip tcpwrapper xml"
+
+RDEPEND="net-libs/gnutls:=
+ ~dev-libs/libprelude-${PV}
+ dbx? ( ~dev-libs/libpreludedb-${PV} )
+ geoip? ( dev-libs/libmaxminddb )
+ tcpwrapper? ( sys-apps/tcp-wrappers )
+ xml? ( dev-libs/libxml2 )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.1.0-run.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_with dbx libpreludedb-prefix) \
+ $(use_enable geoip libmaxminddb) \
+ $(use_with tcpwrapper libwrap) \
+ $(usex xml '' '--without-xml-prefix')
+}
+
+src_install() {
+ default
+
+ rm -rv "${ED%/}/run" || die "rm failed"
+ keepdir /var/spool/prelude-manager{,/failover,/scheduler}
+
+ find "${D}" -name '*.la' -delete || die
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf"
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+}