2010-09-01 17:31:52 +02:00
|
|
|
# New ports collection makefile for: suricata
|
|
|
|
# Date created: Sun Aug 29 16:39:08 BRT 2010
|
|
|
|
# Whom: Patrick Tracanelli <eksffa@freebsdbrasil.com.br>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= suricata
|
2011-06-22 02:29:16 +02:00
|
|
|
PORTVERSION= 1.0.3
|
2010-09-01 17:31:52 +02:00
|
|
|
CATEGORIES= security
|
|
|
|
MASTER_SITES= http://openinfosecfoundation.org/download/ \
|
|
|
|
http://www6.freebsdbrasil.com.br/~eksffa/l/dev/suricata/
|
|
|
|
|
|
|
|
MAINTAINER= eksffa@freebsdbrasil.com.br
|
|
|
|
COMMENT= Open Source next generation IDS/IPS engine by OISF
|
|
|
|
|
2011-07-19 23:14:30 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
|
2010-09-01 17:31:52 +02:00
|
|
|
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre \
|
|
|
|
yaml:${PORTSDIR}/textproc/libyaml \
|
|
|
|
pcap.1:${PORTSDIR}/net/libpcap
|
|
|
|
|
|
|
|
BUILD_DEPENDS+= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet \
|
|
|
|
pkg-config:${PORTSDIR}/devel/pkg-config
|
|
|
|
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= automake autoconf libtool
|
2010-09-01 17:31:52 +02:00
|
|
|
|
|
|
|
USE_RC_SUBR= suricata
|
|
|
|
|
|
|
|
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
|
|
|
|
|
|
|
|
OPTIONS= IPFW "Enable IPFW/IPDIVERT for IPS usage" on \
|
2011-07-19 23:14:30 +02:00
|
|
|
PRELUDE "Enable Prelude NIDS integration" off \
|
|
|
|
DAG "Enable Endace DAG Support" off
|
|
|
|
|
|
|
|
CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
|
2010-09-01 17:31:52 +02:00
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
USE_GMAKE= yes
|
|
|
|
USE_LDCONFIG= yes
|
|
|
|
|
|
|
|
CONFIG_DIR?= ${PREFIX}/etc/suricata
|
|
|
|
CONFIG_FILES= suricata.yaml classification.config
|
|
|
|
RULES_DIR= ${PREFIX}/etc/suricata/rules
|
|
|
|
LOGS_DIR= /var/log/suricata
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2010-09-09 13:41:48 +02:00
|
|
|
.if ${OSVERSION} < 700000
|
|
|
|
BROKEN= does not configure on 6.X
|
|
|
|
.endif
|
2010-09-17 11:31:03 +02:00
|
|
|
.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
|
|
|
|
BROKEN= Does not compile on ia64, powerpc, or sparc64
|
|
|
|
.endif
|
2010-09-09 13:41:48 +02:00
|
|
|
|
2010-09-01 17:31:52 +02:00
|
|
|
.if defined(WITH_PRELUDE)
|
|
|
|
LIB_DEPENDS+= prelude.20:${PORTSDIR}/security/libprelude
|
|
|
|
CONFIGURE_ARGS+= --enable-prelude
|
|
|
|
PLIST_SUB+= PRELUDE=""
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_IPFW)
|
|
|
|
CONFIGURE_ARGS+= --enable-ipfw
|
|
|
|
.endif
|
|
|
|
|
2011-07-19 23:14:30 +02:00
|
|
|
.if defined(WITH_DAG)
|
|
|
|
CONFIGURE_ARGS+= --enable-dag
|
|
|
|
.endif
|
|
|
|
|
2010-09-01 17:31:52 +02:00
|
|
|
pre-install:
|
|
|
|
@${REINPLACE_CMD} -e 's|/etc/suricata|${PREFIX}/etc/suricata|g' ${WRKSRC}/suricata.yaml
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
[ -d ${CONFIG_DIR} ] || ${MKDIR} ${CONFIG_DIR}
|
|
|
|
[ -d ${RULES_DIR} ] || ${MKDIR} ${RULES_DIR}
|
|
|
|
[ -d ${LOGS_DIR} ] || ${MKDIR} ${LOGS_DIR}
|
|
|
|
.for f in ${CONFIG_FILES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${CONFIG_DIR}/${f}-sample
|
|
|
|
@if [ ! -f ${CONFIG_DIR}/${f} ]; then \
|
|
|
|
${CP} -p ${CONFIG_DIR}/${f}-sample ${CONFIG_DIR}/${f} ; \
|
|
|
|
fi
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|