2012-12-16 00:52:36 +01:00
|
|
|
# Created by: Patrick Tracanelli <eksffa@freebsdbrasil.com.br>
|
2010-09-01 17:31:52 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= suricata
|
2019-03-08 15:35:45 +01:00
|
|
|
DISTVERSION= 4.1.3
|
2010-09-01 17:31:52 +02:00
|
|
|
CATEGORIES= security
|
2018-11-09 17:44:57 +01:00
|
|
|
MASTER_SITES= https://www.openinfosecfoundation.org/download/
|
2010-09-01 17:31:52 +02:00
|
|
|
|
2017-03-04 14:33:25 +01:00
|
|
|
MAINTAINER= franco@opnsense.org
|
2014-08-23 14:08:16 +02:00
|
|
|
COMMENT= High Performance Network IDS, IPS and Security Monitoring engine
|
2010-09-01 17:31:52 +02:00
|
|
|
|
2011-07-19 23:14:30 +02:00
|
|
|
LICENSE= GPLv2
|
2015-01-18 08:12:37 +01:00
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
2011-07-19 23:14:30 +02:00
|
|
|
|
2016-04-01 16:25:16 +02:00
|
|
|
LIB_DEPENDS= libpcre.so:devel/pcre \
|
|
|
|
libnet.so:net/libnet \
|
2018-12-09 02:31:30 +01:00
|
|
|
liblz4.so:archivers/liblz4 \
|
2016-04-01 16:25:16 +02:00
|
|
|
libyaml.so:textproc/libyaml
|
2010-09-01 17:31:52 +02:00
|
|
|
|
2018-12-09 02:31:30 +01:00
|
|
|
USES= autoreconf cpe gmake iconv:translit libtool pathfix pkgconfig
|
|
|
|
|
|
|
|
CONFLICTS_INSTALL=libhtp
|
|
|
|
|
2013-11-17 04:09:13 +01:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
USE_RC_SUBR= ${PORTNAME}
|
2019-03-08 15:35:45 +01:00
|
|
|
PLIST_SUB= PORTVERSION=${PORTVERSION}
|
2016-07-31 16:21:35 +02:00
|
|
|
|
2013-11-17 04:09:13 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2011-07-19 23:14:30 +02:00
|
|
|
|
2015-04-15 21:12:18 +02:00
|
|
|
CPE_VENDOR= openinfosecfoundation
|
|
|
|
|
2014-12-22 16:11:54 +01:00
|
|
|
INSTALL_TARGET= install-strip
|
2016-07-31 16:21:35 +02:00
|
|
|
TEST_TARGET= check
|
|
|
|
|
2019-01-13 21:58:36 +01:00
|
|
|
OPTIONS_DEFINE= IPFW JSON NETMAP NSS PORTS_PCAP PRELUDE \
|
2018-12-10 17:04:49 +01:00
|
|
|
PYTHON REDIS RUST TESTS
|
2017-03-04 14:33:25 +01:00
|
|
|
OPTIONS_DEFINE_amd64= HYPERSCAN
|
2018-12-10 17:04:49 +01:00
|
|
|
OPTIONS_DEFAULT= IPFW JSON NETMAP PYTHON RUST
|
2016-07-31 16:21:35 +02:00
|
|
|
OPTIONS_SUB= yes
|
2015-11-26 12:25:42 +01:00
|
|
|
|
2015-01-18 08:12:37 +01:00
|
|
|
OPTIONS_RADIO= SCRIPTS
|
|
|
|
OPTIONS_RADIO_SCRIPTS= LUA LUAJIT
|
2015-11-26 12:25:42 +01:00
|
|
|
|
2015-01-18 08:12:37 +01:00
|
|
|
SCRIPTS_DESC= Scripting
|
|
|
|
|
2017-03-04 14:33:25 +01:00
|
|
|
HYPERSCAN_DESC= Hyperscan support
|
2015-01-18 08:12:37 +01:00
|
|
|
IPFW_DESC= IPFW and IP Divert support for inline IDP
|
|
|
|
JSON_DESC= JSON output support
|
|
|
|
LUAJIT_DESC= LuaJIT scripting support
|
2018-12-09 02:31:30 +01:00
|
|
|
LUA_DESC= LUA scripting support
|
2015-11-26 12:25:42 +01:00
|
|
|
NETMAP_DESC= Netmap support for inline IDP
|
2015-01-18 08:12:37 +01:00
|
|
|
NSS_DESC= File checksums and SSL/TLS fingerprinting
|
2014-12-22 16:11:54 +01:00
|
|
|
PORTS_PCAP_DESC= Use libpcap from ports
|
2015-01-18 08:12:37 +01:00
|
|
|
PRELUDE_DESC= Prelude support for NIDS alerts
|
2018-12-10 17:04:49 +01:00
|
|
|
PYTHON_DESC= Python-based update and control utilities
|
2017-07-13 18:46:24 +02:00
|
|
|
REDIS_DESC= Redis output support
|
2018-12-09 02:31:30 +01:00
|
|
|
RUST_DESC= Rust parser support
|
2015-01-18 08:12:37 +01:00
|
|
|
TESTS_DESC= Unit tests in suricata binary
|
2014-12-22 16:11:54 +01:00
|
|
|
|
2017-03-04 14:33:25 +01:00
|
|
|
HYPERSCAN_LIB_DEPENDS= libhs.so:devel/hyperscan
|
|
|
|
HYPERSCAN_CONFIGURE_ON= --with-libhs-includes=${LOCALBASE}/include \
|
|
|
|
--with-libhs-libraries=${LOCALBASE}/lib
|
|
|
|
|
2014-08-23 14:08:16 +02:00
|
|
|
IPFW_CONFIGURE_ON= --enable-ipfw
|
2014-12-22 16:11:54 +01:00
|
|
|
|
2016-04-01 16:25:16 +02:00
|
|
|
JSON_LIB_DEPENDS= libjansson.so:devel/jansson
|
2015-01-18 08:12:37 +01:00
|
|
|
JSON_CONFIGURE_ON= --with-libjansson-includes=${LOCALBASE}/include \
|
2014-11-11 16:57:52 +01:00
|
|
|
--with-libjansson-libraries=${LOCALBASE}/lib
|
2014-12-22 16:11:54 +01:00
|
|
|
|
2015-01-18 08:12:37 +01:00
|
|
|
LUA_USES= lua:51
|
|
|
|
LUA_CONFIGURE_ON= --enable-lua \
|
|
|
|
--with-liblua-includes=${LUA_INCDIR} \
|
|
|
|
--with-liblua-libraries=${LUA_LIBDIR}
|
|
|
|
|
2016-04-01 16:25:16 +02:00
|
|
|
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
|
2015-01-18 08:12:37 +01:00
|
|
|
LUAJIT_CONFIGURE_ON= --enable-luajit
|
|
|
|
|
2016-04-01 16:25:16 +02:00
|
|
|
NSS_LIB_DEPENDS= libnss3.so:security/nss \
|
|
|
|
libnspr4.so:devel/nspr
|
2018-04-02 02:01:13 +02:00
|
|
|
NSS_CONFIGURE_OFF= --disable-nss --disable-nspr
|
2014-12-22 16:11:54 +01:00
|
|
|
NSS_CONFIGURE_ON= --with-libnss-includes=${LOCALBASE}/include/nss/nss \
|
2015-01-18 08:12:37 +01:00
|
|
|
--with-libnss-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-libnspr-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-libnspr-includes=${LOCALBASE}/include/nspr
|
|
|
|
|
2015-11-26 12:25:42 +01:00
|
|
|
NETMAP_CONFIGURE_ENABLE= netmap
|
|
|
|
|
2016-08-06 10:51:43 +02:00
|
|
|
PORTS_PCAP_LIB_DEPENDS= libpcap.so.1:net/libpcap
|
2015-11-26 12:25:42 +01:00
|
|
|
PORTS_PCAP_CONFIGURE_ON= --with-libpcap-includes=${LOCALBASE}/include \
|
|
|
|
--with-libpcap-libraries=${LOCALBASE}/lib
|
|
|
|
PORTS_PCAP_CONFIGURE_OFF= --with-libpcap-includes=/usr/include \
|
|
|
|
--with-libpcap-libraries=/usr/lib
|
|
|
|
|
2017-06-18 17:06:34 +02:00
|
|
|
PRELUDE_LIB_DEPENDS= libprelude.so:security/libprelude \
|
|
|
|
libgnutls.so:security/gnutls \
|
|
|
|
libgcrypt.so:security/libgcrypt \
|
|
|
|
libgpg-error.so:security/libgpg-error \
|
|
|
|
libltdl.so:devel/libltdl
|
2015-11-26 12:25:42 +01:00
|
|
|
PRELUDE_CONFIGURE_ENABLE= prelude
|
|
|
|
PRELUDE_CONFIGURE_ON= --with-libprelude-prefix=${LOCALBASE}
|
|
|
|
|
2019-03-08 15:35:45 +01:00
|
|
|
PYTHON_USES= python
|
|
|
|
PYTHON_USE= PYTHON=py3kplist
|
2018-12-10 17:04:49 +01:00
|
|
|
PYTHON_CONFIGURE_ENABLE= python
|
|
|
|
PYTHON_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
|
2018-12-20 07:37:02 +01:00
|
|
|
PYTHON_BUILD_DEPENDS= ${PYTHON_RUN_DEPENDS}
|
2018-12-10 17:04:49 +01:00
|
|
|
|
2017-07-13 18:46:24 +02:00
|
|
|
REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis
|
|
|
|
REDIS_CONFIGURE_ON= --enable-hiredis \
|
|
|
|
--with-libhiredis-includes=${LOCALBASE}/include \
|
|
|
|
--with-libhiredis-libraries=${LOCALBASE}/lib
|
|
|
|
|
2019-01-04 05:00:39 +01:00
|
|
|
RUST_BUILD_DEPENDS= rustc:lang/${RUST_DEFAULT}
|
2018-12-09 02:31:30 +01:00
|
|
|
RUST_CONFIGURE_ENABLE= rust
|
|
|
|
|
2014-12-22 16:11:54 +01:00
|
|
|
TESTS_CONFIGURE_ENABLE= unittests
|
2010-09-01 17:31:52 +02:00
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
2013-11-17 04:09:13 +01:00
|
|
|
|
2014-11-11 16:57:52 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-gccprotect \
|
2018-12-09 02:31:30 +01:00
|
|
|
--enable-bundled-htp \
|
2014-08-23 14:08:16 +02:00
|
|
|
--with-libpcre-includes=${LOCALBASE}/include \
|
|
|
|
--with-libpcre-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-libyaml-includes=${LOCALBASE}/include \
|
|
|
|
--with-libyaml-libraries=${LOCALBASE}/lib \
|
2016-03-20 11:53:08 +01:00
|
|
|
--with-libnet-includes=${LOCALBASE}/include \
|
|
|
|
--with-libnet-libraries=${LOCALBASE}/lib \
|
2014-08-23 14:08:16 +02:00
|
|
|
--with-libhtp-includes=${LOCALBASE}/include/ \
|
|
|
|
--with-libhtp-libraries=${LOCALBASE}/lib \
|
2016-03-20 11:53:08 +01:00
|
|
|
--disable-gccmarch-native
|
2013-11-17 04:09:13 +01:00
|
|
|
|
|
|
|
CONFIG_DIR?= ${ETCDIR}
|
2015-04-27 18:05:52 +02:00
|
|
|
CONFIG_FILES= suricata.yaml classification.config reference.config threshold.config
|
2013-11-17 04:09:13 +01:00
|
|
|
LOGS_DIR?= /var/log/${PORTNAME}
|
2010-09-01 17:31:52 +02:00
|
|
|
|
2014-08-23 14:08:16 +02:00
|
|
|
pre-patch:
|
2018-04-02 02:01:13 +02:00
|
|
|
@${CP} ${FILESDIR}/ax_check_compile_flag.m4 ${WRKSRC}/m4
|
2012-01-10 20:34:02 +01:00
|
|
|
|
2019-03-08 15:35:45 +01:00
|
|
|
post-patch-PYTHON-on:
|
|
|
|
@${REINPLACE_CMD} -e "/AC_PATH_PROGS.*HAVE_PYTHON/ s/python[^,]*,/${PYTHON_VERSION},/g" \
|
|
|
|
${WRKSRC}/configure.ac
|
|
|
|
|
2010-09-01 17:31:52 +02:00
|
|
|
post-install:
|
2018-04-02 02:01:13 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${CONFIG_DIR}
|
|
|
|
@${MKDIR} ${STAGEDIR}${LOGS_DIR}
|
2010-09-01 17:31:52 +02:00
|
|
|
.for f in ${CONFIG_FILES}
|
2014-11-11 16:57:52 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${CONFIG_DIR}/${f}.sample
|
2010-09-01 17:31:52 +02:00
|
|
|
.endfor
|
2013-11-17 04:09:13 +01:00
|
|
|
|
2018-12-10 17:04:49 +01:00
|
|
|
post-install-PYTHON-on:
|
2015-01-18 08:12:37 +01:00
|
|
|
(cd ${STAGEDIR}${PREFIX} \
|
|
|
|
&& ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
|
|
|
|
-d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})
|
|
|
|
|
2017-08-09 10:15:21 +02:00
|
|
|
.include <bsd.port.mk>
|