Lines 2-8
Link Here
|
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= suricata |
4 |
PORTNAME= suricata |
5 |
DISTVERSION= 4.0.5 |
5 |
DISTVERSION= 4.1.0-rc1 |
6 |
CATEGORIES= security |
6 |
CATEGORIES= security |
7 |
MASTER_SITES= http://www.openinfosecfoundation.org/download/ |
7 |
MASTER_SITES= http://www.openinfosecfoundation.org/download/ |
8 |
|
8 |
|
Lines 12-22
COMMENT= High Performance Network IDS, IPS and Security Monitoring engine
Link Here
|
12 |
LICENSE= GPLv2 |
12 |
LICENSE= GPLv2 |
13 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
13 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
14 |
|
14 |
|
|
|
15 |
CONFLICTS_INSTALL=libhtp |
16 |
|
15 |
LIB_DEPENDS= libpcre.so:devel/pcre \ |
17 |
LIB_DEPENDS= libpcre.so:devel/pcre \ |
16 |
libnet.so:net/libnet \ |
18 |
libnet.so:net/libnet \ |
17 |
libyaml.so:textproc/libyaml |
19 |
libyaml.so:textproc/libyaml |
18 |
|
20 |
|
19 |
USES= autoreconf cpe gmake libtool pathfix pkgconfig |
21 |
USES= autoreconf cpe gmake iconv:translit libtool pathfix pkgconfig |
20 |
USE_LDCONFIG= yes |
22 |
USE_LDCONFIG= yes |
21 |
USE_RC_SUBR= ${PORTNAME} |
23 |
USE_RC_SUBR= ${PORTNAME} |
22 |
|
24 |
|
Lines 27-34
CPE_VENDOR= openinfosecfoundation
Link Here
|
27 |
INSTALL_TARGET= install-strip |
29 |
INSTALL_TARGET= install-strip |
28 |
TEST_TARGET= check |
30 |
TEST_TARGET= check |
29 |
|
31 |
|
30 |
OPTIONS_DEFINE= GEOIP HTP_PORT IPFW JSON NETMAP NSS PORTS_PCAP PRELUDE \ |
32 |
OPTIONS_DEFINE= GEOIP IPFW JSON NETMAP NSS PORTS_PCAP PRELUDE \ |
31 |
REDIS SC TESTS |
33 |
REDIS RUST SC TESTS |
32 |
OPTIONS_DEFINE_amd64= HYPERSCAN |
34 |
OPTIONS_DEFINE_amd64= HYPERSCAN |
33 |
OPTIONS_DEFAULT= IPFW JSON NETMAP PRELUDE |
35 |
OPTIONS_DEFAULT= IPFW JSON NETMAP PRELUDE |
34 |
OPTIONS_SUB= yes |
36 |
OPTIONS_SUB= yes |
Lines 40-68
SCRIPTS_DESC= Scripting
Link Here
|
40 |
|
42 |
|
41 |
GEOIP_DESC= GeoIP support |
43 |
GEOIP_DESC= GeoIP support |
42 |
HYPERSCAN_DESC= Hyperscan support |
44 |
HYPERSCAN_DESC= Hyperscan support |
43 |
HTP_PORT_DESC= Use libhtp from ports |
|
|
44 |
IPFW_DESC= IPFW and IP Divert support for inline IDP |
45 |
IPFW_DESC= IPFW and IP Divert support for inline IDP |
45 |
JSON_DESC= JSON output support |
46 |
JSON_DESC= JSON output support |
46 |
LUA_DESC= LUA scripting support |
|
|
47 |
LUAJIT_DESC= LuaJIT scripting support |
47 |
LUAJIT_DESC= LuaJIT scripting support |
|
|
48 |
LUA_DESC= LUA scripting support |
48 |
NETMAP_DESC= Netmap support for inline IDP |
49 |
NETMAP_DESC= Netmap support for inline IDP |
49 |
NSS_DESC= File checksums and SSL/TLS fingerprinting |
50 |
NSS_DESC= File checksums and SSL/TLS fingerprinting |
50 |
PORTS_PCAP_DESC= Use libpcap from ports |
51 |
PORTS_PCAP_DESC= Use libpcap from ports |
51 |
PRELUDE_DESC= Prelude support for NIDS alerts |
52 |
PRELUDE_DESC= Prelude support for NIDS alerts |
52 |
REDIS_DESC= Redis output support |
53 |
REDIS_DESC= Redis output support |
|
|
54 |
RUST_DESC= Rust parser support (experimental) |
53 |
SC_DESC= Suricata socket client (suricatasc) |
55 |
SC_DESC= Suricata socket client (suricatasc) |
54 |
TESTS_DESC= Unit tests in suricata binary |
56 |
TESTS_DESC= Unit tests in suricata binary |
55 |
|
57 |
|
56 |
GEOIP_LIB_DEPENDS= libGeoIP.so:net/GeoIP |
58 |
GEOIP_LIB_DEPENDS= libGeoIP.so:net/GeoIP |
57 |
GEOIP_CONFIGURE_ON= --enable-geoip |
59 |
GEOIP_CONFIGURE_ON= --enable-geoip |
58 |
|
60 |
|
59 |
HTP_PORT_BUILD_DEPENDS= libhtp>=0.5.27:devel/libhtp |
|
|
60 |
HTP_PORT_LIB_DEPENDS= libhtp.so:devel/libhtp |
61 |
HTP_PORT_CONFIGURE_ON= --enable-non-bundled-htp |
62 |
HTP_PORT_CONFIGURE_OFF= --enable-bundled-htp |
63 |
HTP_PORT_CONFLICTS_INSTALL_OFF= libhtp |
64 |
HTP_PORT_USES_OFF= iconv:translit |
65 |
|
66 |
HYPERSCAN_LIB_DEPENDS= libhs.so:devel/hyperscan |
61 |
HYPERSCAN_LIB_DEPENDS= libhs.so:devel/hyperscan |
67 |
HYPERSCAN_CONFIGURE_ON= --with-libhs-includes=${LOCALBASE}/include \ |
62 |
HYPERSCAN_CONFIGURE_ON= --with-libhs-includes=${LOCALBASE}/include \ |
68 |
--with-libhs-libraries=${LOCALBASE}/lib |
63 |
--with-libhs-libraries=${LOCALBASE}/lib |
Lines 83-89
LUAJIT_CONFIGURE_ON= --enable-luajit
Link Here
|
83 |
|
78 |
|
84 |
NSS_LIB_DEPENDS= libnss3.so:security/nss \ |
79 |
NSS_LIB_DEPENDS= libnss3.so:security/nss \ |
85 |
libnspr4.so:devel/nspr |
80 |
libnspr4.so:devel/nspr |
86 |
NSS_CONFIGURE_OFF= --disable-nss --disable-nspr |
|
|
87 |
NSS_CONFIGURE_ON= --with-libnss-includes=${LOCALBASE}/include/nss/nss \ |
81 |
NSS_CONFIGURE_ON= --with-libnss-includes=${LOCALBASE}/include/nss/nss \ |
88 |
--with-libnss-libraries=${LOCALBASE}/lib \ |
82 |
--with-libnss-libraries=${LOCALBASE}/lib \ |
89 |
--with-libnspr-libraries=${LOCALBASE}/lib \ |
83 |
--with-libnspr-libraries=${LOCALBASE}/lib \ |
Lines 110-115
REDIS_CONFIGURE_ON= --enable-hiredis \
Link Here
|
110 |
--with-libhiredis-includes=${LOCALBASE}/include \ |
104 |
--with-libhiredis-includes=${LOCALBASE}/include \ |
111 |
--with-libhiredis-libraries=${LOCALBASE}/lib |
105 |
--with-libhiredis-libraries=${LOCALBASE}/lib |
112 |
|
106 |
|
|
|
107 |
RUST_BUILD_DEPENDS= rustc:lang/rust |
108 |
RUST_CONFIGURE_ENABLE= rust |
109 |
|
113 |
SC_USES= python:2.7 |
110 |
SC_USES= python:2.7 |
114 |
SC_CONFIGURE_ENABLE= python |
111 |
SC_CONFIGURE_ENABLE= python |
115 |
|
112 |
|
Lines 118-123
TESTS_CONFIGURE_ENABLE= unittests
Link Here
|
118 |
SUB_FILES= pkg-message |
115 |
SUB_FILES= pkg-message |
119 |
|
116 |
|
120 |
CONFIGURE_ARGS+=--enable-gccprotect \ |
117 |
CONFIGURE_ARGS+=--enable-gccprotect \ |
|
|
118 |
--enable-bundled-htp \ |
121 |
--with-libpcre-includes=${LOCALBASE}/include \ |
119 |
--with-libpcre-includes=${LOCALBASE}/include \ |
122 |
--with-libpcre-libraries=${LOCALBASE}/lib \ |
120 |
--with-libpcre-libraries=${LOCALBASE}/lib \ |
123 |
--with-libyaml-includes=${LOCALBASE}/include \ |
121 |
--with-libyaml-includes=${LOCALBASE}/include \ |
Lines 130-154
CONFIGURE_ARGS+=--enable-gccprotect \
Link Here
|
130 |
|
128 |
|
131 |
CONFIG_DIR?= ${ETCDIR} |
129 |
CONFIG_DIR?= ${ETCDIR} |
132 |
CONFIG_FILES= suricata.yaml classification.config reference.config threshold.config |
130 |
CONFIG_FILES= suricata.yaml classification.config reference.config threshold.config |
133 |
RULES_DIR= ${CONFIG_DIR}/rules |
|
|
134 |
RULES_FILES= app-layer-events.rules decoder-events.rules dns-events.rules files.rules \ |
135 |
http-events.rules modbus-events.rules smtp-events.rules stream-events.rules \ |
136 |
tls-events.rules |
137 |
LOGS_DIR?= /var/log/${PORTNAME} |
131 |
LOGS_DIR?= /var/log/${PORTNAME} |
138 |
|
132 |
|
139 |
pre-patch: |
133 |
pre-patch: |
140 |
@${CP} ${FILESDIR}/ax_check_compile_flag.m4 ${WRKSRC}/m4 |
134 |
@${CP} ${FILESDIR}/ax_check_compile_flag.m4 ${WRKSRC}/m4 |
141 |
|
135 |
|
|
|
136 |
post-patch-NSS-off: |
137 |
@${REINPLACE_CMD} -e 's|PKG_CHECK_MODULES(\[libnspr\]|#&| ; s|AC_CHECK_HEADER(sechash.h,NSS="yes",NSS="no")|#&|' ${WRKSRC}/configure.ac |
138 |
|
142 |
post-install: |
139 |
post-install: |
143 |
@${MKDIR} ${STAGEDIR}${CONFIG_DIR} |
140 |
@${MKDIR} ${STAGEDIR}${CONFIG_DIR} |
144 |
@${MKDIR} ${STAGEDIR}${RULES_DIR} |
|
|
145 |
@${MKDIR} ${STAGEDIR}${LOGS_DIR} |
141 |
@${MKDIR} ${STAGEDIR}${LOGS_DIR} |
146 |
.for f in ${CONFIG_FILES} |
142 |
.for f in ${CONFIG_FILES} |
147 |
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${CONFIG_DIR}/${f}.sample |
143 |
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${CONFIG_DIR}/${f}.sample |
148 |
.endfor |
144 |
.endfor |
149 |
.for f in ${RULES_FILES} |
|
|
150 |
${INSTALL_DATA} ${WRKSRC}/rules/${f} ${STAGEDIR}${RULES_DIR}/${f} |
151 |
.endfor |
152 |
|
145 |
|
153 |
post-install-SC-on: |
146 |
post-install-SC-on: |
154 |
(cd ${STAGEDIR}${PREFIX} \ |
147 |
(cd ${STAGEDIR}${PREFIX} \ |