1999-08-02 10:14:11 +00:00
|
|
|
# New ports collection makefile for: snort
|
|
|
|
# Date created: Mon Aug 2 12:04:08 CEST 1999
|
|
|
|
# Whom: Dirk Froemberg <dirk@FreeBSD.org>
|
|
|
|
#
|
1999-08-31 01:53:22 +00:00
|
|
|
# $FreeBSD$
|
1999-08-02 10:14:11 +00:00
|
|
|
#
|
|
|
|
|
2000-04-09 18:34:06 +00:00
|
|
|
PORTNAME= snort
|
2005-10-18 16:32:10 +00:00
|
|
|
PORTVERSION= 2.4.3
|
2005-11-14 17:07:08 +00:00
|
|
|
PORTREVISION= 1
|
2000-06-02 03:18:54 +00:00
|
|
|
CATEGORIES= security
|
2005-03-10 16:09:10 +00:00
|
|
|
MASTER_SITES= http://www.snort.org/dl/current/
|
1999-08-02 10:14:11 +00:00
|
|
|
|
2005-10-18 16:32:10 +00:00
|
|
|
MAINTAINER= question+fbsdports@closedsrc.org
|
2003-03-07 06:14:21 +00:00
|
|
|
COMMENT= Lightweight network intrusion detection system
|
1999-08-02 10:14:11 +00:00
|
|
|
|
2003-12-23 11:30:13 +00:00
|
|
|
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre
|
|
|
|
|
2004-10-12 07:37:21 +00:00
|
|
|
OPTIONS= FLEXRESP "Flexible response to events" off \
|
|
|
|
MYSQL "Enable MySQL support" off \
|
|
|
|
ODBC "Enable ODBC support" off \
|
2005-02-07 09:35:32 +00:00
|
|
|
POSTGRESQL "Enable PostgreSQL support" off \
|
2005-10-07 15:07:30 +00:00
|
|
|
PRELUDE "Enable Prelude NIDS integration" off
|
2004-01-20 13:46:20 +00:00
|
|
|
|
2004-04-11 21:25:51 +00:00
|
|
|
USE_GPG= yes
|
2005-10-07 15:07:30 +00:00
|
|
|
SIG_SUFFIX= .sig
|
2003-12-19 23:20:22 +00:00
|
|
|
USE_REINPLACE= yes
|
2005-10-07 15:07:30 +00:00
|
|
|
USE_RC_SUBR= snort.sh
|
|
|
|
SUB_FILES= pkg-message
|
1999-08-02 10:14:11 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2003-12-23 11:30:13 +00:00
|
|
|
CONFIGURE_ENV= LDFLAGS="${LDFLAGS}"
|
2005-04-12 03:26:56 +00:00
|
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
1999-08-02 10:14:11 +00:00
|
|
|
|
2005-10-07 15:07:30 +00:00
|
|
|
CONFIG_DIR?= ${PREFIX}/etc/snort
|
|
|
|
CONFIG_FILES= classification.config gen-msg.map generators reference.config \
|
|
|
|
sid sid-msg.map snort.conf threshold.conf unicode.map
|
|
|
|
|
2004-10-12 07:37:21 +00:00
|
|
|
MAN8= snort.8
|
2005-10-07 15:07:30 +00:00
|
|
|
DOCS= RELEASE.NOTES doc/AUTHORS doc/BUGS doc/CREDITS \
|
|
|
|
doc/README* doc/USAGE doc/*.pdf
|
2004-10-12 07:37:21 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2000-12-31 15:07:49 +00:00
|
|
|
.if defined(WITH_FLEXRESP)
|
2005-11-14 17:07:08 +00:00
|
|
|
BUILD_DEPENDS+= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10
|
2003-12-23 11:30:13 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-flexresp \
|
|
|
|
--with-libnet-includes=${LOCALBASE}/include \
|
|
|
|
--with-libnet-libraries=${LOCALBASE}/lib
|
2000-12-31 15:07:49 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_MYSQL)
|
2003-12-19 23:20:22 +00:00
|
|
|
USE_MYSQL= yes
|
|
|
|
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-mysql=no
|
2000-12-31 15:07:49 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_ODBC)
|
2003-12-19 23:20:22 +00:00
|
|
|
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
|
|
|
|
CONFIGURE_ARGS+= --with-odbc=${LOCALBASE}
|
|
|
|
LDFLAGS+= ${PTHREAD_LIBS}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-odbc=no
|
2000-12-31 15:07:49 +00:00
|
|
|
.endif
|
|
|
|
|
2004-04-20 20:59:42 +00:00
|
|
|
.if defined(WITH_POSTGRESQL)
|
2005-01-31 00:35:55 +00:00
|
|
|
USE_PGSQL= yes
|
2003-12-19 23:20:22 +00:00
|
|
|
CONFIGURE_ARGS+= --with-postgresql=${LOCALBASE}
|
2000-12-31 15:07:49 +00:00
|
|
|
.if exists(/usr/lib/libssl.a) && exists(/usr/lib/libcrypto.a)
|
2003-12-19 23:20:22 +00:00
|
|
|
LDFLAGS+= -lssl -lcrypto
|
2000-12-31 15:07:49 +00:00
|
|
|
.endif
|
2003-12-19 23:20:22 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-postgresql=no
|
2000-12-31 15:07:49 +00:00
|
|
|
.endif
|
|
|
|
|
2005-02-07 09:35:32 +00:00
|
|
|
.if defined(WITH_PRELUDE)
|
2005-11-23 12:19:03 +00:00
|
|
|
LIB_DEPENDS+= prelude.2:${PORTSDIR}/security/libprelude
|
2005-10-07 15:07:30 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-prelude
|
2005-02-07 09:35:32 +00:00
|
|
|
PLIST_SUB+= PRELUDE=""
|
|
|
|
.else
|
2005-10-07 15:07:30 +00:00
|
|
|
CONFIGURE_ARGS+= --disable-prelude
|
2005-02-07 09:35:32 +00:00
|
|
|
PLIST_SUB+= PRELUDE="@comment "
|
|
|
|
.endif
|
|
|
|
|
2002-10-06 09:48:09 +00:00
|
|
|
post-patch:
|
2005-10-07 15:07:30 +00:00
|
|
|
${REINPLACE_CMD} "s,/etc/snort.conf,${CONFIG_DIR}/snort.conf," \
|
|
|
|
${WRKSRC}/src/snort.c ${WRKSRC}/snort.8
|
2000-12-31 15:07:49 +00:00
|
|
|
|
1999-08-02 10:14:11 +00:00
|
|
|
post-install:
|
2005-10-07 15:07:30 +00:00
|
|
|
[ -d ${CONFIG_DIR} ] || ${MKDIR} ${CONFIG_DIR}
|
|
|
|
.for f in ${CONFIG_FILES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/etc/${f} ${CONFIG_DIR}/${f}-sample
|
2004-01-02 22:54:17 +00:00
|
|
|
.endfor
|
2005-10-07 15:07:30 +00:00
|
|
|
@${MKDIR} ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/schemas/create* ${EXAMPLESDIR}
|
2004-01-02 22:54:17 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
|
|
|
|
.endif
|
2004-07-04 22:17:18 +00:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
1999-08-02 10:14:11 +00:00
|
|
|
|
2004-10-12 07:37:21 +00:00
|
|
|
.include <bsd.port.post.mk>
|