Gentoo Archives: gentoo-commits

From: Slawek Lis <slis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/suricata/
Date: Tue, 26 Apr 2016 06:18:42
Message-Id: 1461651518.1746742cde4026dc3ae9b97b8aa1b722734798c1.slis@gentoo
1 commit: 1746742cde4026dc3ae9b97b8aa1b722734798c1
2 Author: Slawomir Lis <slis <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 26 06:18:38 2016 +0000
4 Commit: Slawek Lis <slis <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 06:18:38 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1746742c
7
8 version bump (#580824)
9
10 Package-Manager: portage-2.2.28
11
12 net-analyzer/suricata/Manifest | 1 +
13 net-analyzer/suricata/suricata-3.0.1.ebuild | 113 ++++++++++++++++++++++++++++
14 2 files changed, 114 insertions(+)
15
16 diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest
17 index cff1749..d82d007 100644
18 --- a/net-analyzer/suricata/Manifest
19 +++ b/net-analyzer/suricata/Manifest
20 @@ -1 +1,2 @@
21 DIST suricata-2.0.11.tar.gz 3091124 SHA256 c607f1e18e5636830f42a83f7c67e1466f07db82853f3a9dba4ab8c6c3bc656e SHA512 659e893fef3cdcca8440f2af7596d5cc58b142d3350b9ea5ba57d855c6759a00adafeb15a1dfe91dd55eca1437487eb4e842b4e2913d12417f0b906ca3d54ec9 WHIRLPOOL 5cfa55abd90284a0a3441853af9db18075a23fa5661d89448b409b8fdd1031ad348d76d455b7dfe7b2688e69633f5bbb65dc060cc2426af017ab1bcb824c9ac5
22 +DIST suricata-3.0.1.tar.gz 3315637 SHA256 74c685f8da51b3f038a7b8185bdbed274aca25daf64ac7ea01eea60636727f26 SHA512 cd10f5b19dd7b6ccbed668263b54d93738842191e71391b040aa7fc2049ac597feb38cd333f07b15d30ebeaf778f6abe18b72215e609891608dca094531c7fd8 WHIRLPOOL a1f6c8ee760cac9e3daa3358e89d30b4a24441fb975214ae2fe165fcb697b4292e035007323041febdc0d8f09b16666515aba76f60f1e437d865193db3deb25d
23
24 diff --git a/net-analyzer/suricata/suricata-3.0.1.ebuild b/net-analyzer/suricata/suricata-3.0.1.ebuild
25 new file mode 100644
26 index 0000000..79c1aff
27 --- /dev/null
28 +++ b/net-analyzer/suricata/suricata-3.0.1.ebuild
29 @@ -0,0 +1,113 @@
30 +# Copyright 1999-2016 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=5
35 +
36 +inherit autotools eutils user
37 +
38 +DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
39 +HOMEPAGE="http://suricata-ids.org/"
40 +SRC_URI="http://www.openinfosecfoundation.org/download/${P}.tar.gz"
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~x86"
45 +IUSE="+af-packet control-socket cuda debug +detection geoip hardened lua luajit nflog +nfqueue +rules test"
46 +
47 +DEPEND="
48 + >=dev-libs/jansson-2.2
49 + dev-libs/libpcre
50 + dev-libs/libyaml
51 + net-libs/libnet:*
52 + net-libs/libnfnetlink
53 + dev-libs/nspr
54 + dev-libs/nss
55 + >=net-libs/libhtp-0.5.18
56 + net-libs/libpcap
57 + sys-apps/file
58 + cuda? ( dev-util/nvidia-cuda-toolkit )
59 + geoip? ( dev-libs/geoip )
60 + lua? ( dev-lang/lua:* )
61 + luajit? ( dev-lang/luajit:* )
62 + nflog? ( net-libs/libnetfilter_log )
63 + nfqueue? ( net-libs/libnetfilter_queue )
64 +"
65 +# #446814
66 +# prelude? ( dev-libs/libprelude )
67 +# pfring? ( sys-process/numactl net-libs/pf_ring)
68 +RDEPEND="${DEPEND}"
69 +
70 +pkg_setup() {
71 + enewgroup ${PN}
72 + enewuser ${PN} -1 -1 /var/lib/${PN} "${PN}"
73 +}
74 +
75 +src_prepare() {
76 + eautoreconf
77 +}
78 +
79 +src_configure() {
80 + local myeconfargs=(
81 + "--localstatedir=/var/" \
82 + "--enable-non-bundled-htp" \
83 + $(use_enable af-packet) \
84 + $(use_enable detection) \
85 + $(use_enable nfqueue) \
86 + $(use_enable test coccinelle) \
87 + $(use_enable test unittests) \
88 + $(use_enable control-socket unix-socket)
89 + )
90 +
91 + if use cuda ; then
92 + myeconfargs+=( $(use_enable cuda) )
93 + fi
94 + if use debug ; then
95 + myeconfargs+=( $(use_enable debug) )
96 + fi
97 + if use geoip ; then
98 + myeconfargs+=( $(use_enable geoip) )
99 + fi
100 + if use hardened ; then
101 + myeconfargs+=( $(use_enable hardened gccprotect) )
102 + fi
103 + if use nflog ; then
104 + myeconfargs+=( $(use_enable nflog) )
105 + fi
106 + # not supported yet (no pfring in portage)
107 +# if use pfring ; then
108 +# myeconfargs+=( $(use_enable pfring) )
109 +# fi
110 + # no libprelude in portage
111 +# if use prelude ; then
112 +# myeconfargs+=( $(use_enable prelude) )
113 +# fi
114 + if use lua ; then
115 + myeconfargs+=( $(use_enable lua) )
116 + fi
117 + if use luajit ; then
118 + myeconfargs+=( $(use_enable luajit) )
119 + fi
120 +
121 +# this should be used when pf_ring use flag support will be added
122 +# LIBS+="-lrt -lnuma"
123 +
124 + econf LIBS="${LIBS}" ${myeconfargs[@]}
125 +}
126 +
127 +src_install() {
128 + emake DESTDIR="${D}" install
129 +
130 + insinto "/etc/${PN}"
131 + doins {classification,reference,threshold}.config suricata.yaml
132 +
133 + if use rules ; then
134 + insinto "/etc/${PN}/rules"
135 + doins rules/*.rules
136 + fi
137 +
138 + dodir "/var/lib/${PN}"
139 + dodir "/var/log/${PN}"
140 + fowners -R ${PN}: "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}"
141 + fperms 750 "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}"
142 +}