summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Seichter <github@seichter.de>2018-10-20 21:30:21 +0200
committerMichał Górny <mgorny@gentoo.org>2018-10-30 11:27:49 +0100
commit9fcab634ffa351e9821d8ae2539aef280f751a25 (patch)
tree8baab2c0e443e9d4d14951d951267a47182494b8 /net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild
parentdev-lang/erlang: Old (diff)
downloadgentoo-9fcab634ffa351e9821d8ae2539aef280f751a25.tar.gz
gentoo-9fcab634ffa351e9821d8ae2539aef280f751a25.tar.bz2
gentoo-9fcab634ffa351e9821d8ae2539aef280f751a25.zip
net-analyzer/ossec-hids: open source HIDS (new package)
OSSEC is a full platform to monitor and control your systems. It mixes together all the aspects of HIDS (host-based intrusion detection), log monitoring and SIM/SIEM together in a simple, powerful and open source solution. Signed-off-by: Ralph Seichter <gentoo@seichter.de> Closes: https://bugs.gentoo.org/545788 Package-Manager: Portage-2.3.49, Repoman-2.3.11 Closes: https://github.com/gentoo/gentoo/pull/10189 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild')
-rw-r--r--net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild
new file mode 100644
index 000000000000..9df4ea46973f
--- /dev/null
+++ b/net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit user
+
+DESCRIPTION="Open Source Host-based Intrusion Detection System"
+HOMEPAGE="https://www.ossec.net/"
+SRC_URI="https://github.com/ossec/ossec-hids/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="agent hybrid local mysql postgres server sqlite"
+REQUIRED_USE="^^ ( agent hybrid local server )
+ ?? ( mysql postgres )"
+
+DEPEND="mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ postgres? ( dev-db/postgresql:= )
+ sys-libs/zlib:="
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${P}/src"
+
+declare -a MY_OPT
+
+pkg_setup() {
+ enewuser ossec -1 -1 /var/ossec
+ enewuser ossecm -1 -1 -1 ossec
+ enewuser ossecr -1 -1 -1 ossec
+}
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}/makefile.patch"
+}
+
+src_configure() {
+ local target="local"
+ use agent && target="agent"
+ use hybrid && target="hybrid"
+ use server && target="server"
+ MY_OPT=(
+ TARGET=${target}
+ USE_SQLITE=$(usex sqlite)
+ V=0
+ ZLIB_SYSTEM=yes
+ )
+ use mysql && MY_OPT+=( DATABASE=mysql )
+ use postgres && MY_OPT+=( DATABASE=pgsql )
+}
+
+src_compile() {
+ emake "${MY_OPT[@]}" PREFIX=/var/ossec
+}
+
+src_test() {
+ emake "${MY_OPT[@]}" PREFIX=/var/ossec test
+}
+
+src_install() {
+ keepdir /var/ossec/logs/{alerts,archives,firewall}
+ keepdir /var/ossec/lua/{compiled,native}
+ keepdir /var/ossec/queue/{agent-info,agentless,alerts,diff,fts,ossec,rids,rootcheck,syscheck}
+ keepdir /var/ossec/{.ssh,stats,tmp,var/run}
+ emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install
+}