2008-02-12 09:13:32 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.52 2008/02/12 14:13:32 rui Exp $
|
2001-04-12 11:59:15 -04:00
|
|
|
|
2007-09-15 18:36:51 -04:00
|
|
|
COMMENT= highly flexible sniffer/NIDS
|
2000-02-02 22:58:54 -05:00
|
|
|
|
2008-02-12 09:13:32 -05:00
|
|
|
DISTNAME= snort-2.8.0.1
|
2000-02-02 22:58:54 -05:00
|
|
|
CATEGORIES= net security
|
2005-06-29 02:01:38 -04:00
|
|
|
MASTER_SITES= ${HOMEPAGE}/dl/current/
|
2000-05-29 03:31:38 -04:00
|
|
|
|
2004-04-12 10:56:31 -04:00
|
|
|
HOMEPAGE= http://www.snort.org/
|
2001-02-28 09:32:08 -05:00
|
|
|
|
2008-02-12 09:13:32 -05:00
|
|
|
MAINTAINER= Markus Lude <markus.lude@gmx.de>
|
|
|
|
|
|
|
|
# GPLv2
|
2000-04-22 23:34:40 -04:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2008-02-12 09:13:32 -05:00
|
|
|
WANTLIB= c m pcap
|
2000-02-02 22:58:54 -05:00
|
|
|
|
2008-02-12 09:13:32 -05:00
|
|
|
SHARED_LIBS= sf_engine 1.0 \
|
|
|
|
sf_dns_preproc 1.0 \
|
|
|
|
sf_ftptelnet_preproc 1.0 \
|
|
|
|
sf_smtp_preproc 1.0 \
|
|
|
|
sf_dcerpc_preproc 0.0 \
|
|
|
|
sf_ssh_preproc 0.0 \
|
|
|
|
_sfdynamic_example_rule 0.0 \
|
|
|
|
_sfdynamic_preprocessor_example 0.0
|
2006-10-10 09:33:17 -04:00
|
|
|
|
|
|
|
USE_LIBTOOL= Yes
|
|
|
|
|
2000-07-24 03:57:51 -04:00
|
|
|
SEPARATE_BUILD= concurrent
|
2008-02-12 09:13:32 -05:00
|
|
|
CONFIGURE_STYLE=simple
|
2006-10-10 09:33:17 -04:00
|
|
|
CONFIGURE_ARGS+=${CONFIGURE_SHARED} \
|
|
|
|
--enable-dynamicplugin
|
2000-03-12 22:21:05 -05:00
|
|
|
|
2006-10-10 09:33:17 -04:00
|
|
|
LIB_DEPENDS= pcre::devel/pcre
|
2004-04-12 10:56:31 -04:00
|
|
|
|
2006-01-05 23:22:06 -05:00
|
|
|
# gcc 3.3.5, Bus errors
|
2006-01-05 23:20:32 -05:00
|
|
|
.if ${MACHINE_ARCH} == "sparc64"
|
|
|
|
CFLAGS+= -O0
|
|
|
|
.endif
|
|
|
|
|
2006-06-28 15:27:42 -04:00
|
|
|
FLAVORS= postgresql mysql flexresp prelude
|
2001-02-11 18:51:12 -05:00
|
|
|
FLAVOR?=
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mflexresp}
|
2006-10-10 09:33:17 -04:00
|
|
|
LIB_DEPENDS+= dnet.=1::net/libdnet
|
|
|
|
CONFIGURE_ARGS+=--enable-flexresp2
|
2008-02-12 09:13:32 -05:00
|
|
|
|
|
|
|
MASTER_SITES0= http://www-fs.informatik.uni-tuebingen.de/~lude/openbsd/distfiles/
|
|
|
|
PATCHFILES= snort-flexresp_patch.diff:0
|
2001-02-11 18:51:12 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mpostgresql}
|
2006-08-03 19:15:57 -04:00
|
|
|
LIB_DEPENDS+= pq.>=2::databases/postgresql
|
2006-10-10 09:33:17 -04:00
|
|
|
CONFIGURE_ARGS+=--with-postgresql="${LOCALBASE}"
|
2001-02-11 18:51:12 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mmysql}
|
2006-08-03 19:15:57 -04:00
|
|
|
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
|
2008-02-12 09:13:32 -05:00
|
|
|
CONFIGURE_ARGS+=--with-mysql-libraries="${LOCALBASE}/lib" \
|
|
|
|
--with-mysql-includes="${LOCALBASE}/include"
|
2004-12-15 19:31:20 -05:00
|
|
|
WANTLIB+= z
|
2001-02-11 18:51:12 -05:00
|
|
|
.endif
|
|
|
|
|
2006-06-28 15:27:42 -04:00
|
|
|
.if ${FLAVOR:L:Mprelude}
|
|
|
|
MODULES= devel/gettext
|
2008-02-12 09:13:32 -05:00
|
|
|
WANTLIB+= gcrypt gnutls gpg-error pthread z
|
2006-08-03 19:15:57 -04:00
|
|
|
LIB_DEPENDS+= prelude.>=8::security/prelude/libprelude
|
2006-06-28 15:27:42 -04:00
|
|
|
CONFIGURE_ARGS+=--enable-prelude
|
|
|
|
MESSAGE= ${PKGDIR}/MESSAGE-prelude
|
|
|
|
.endif
|
|
|
|
|
2008-02-12 09:13:32 -05:00
|
|
|
CONFIGS= classification.config gen-msg.map reference.config \
|
|
|
|
sid-msg.map snort.conf threshold.conf unicode.map
|
|
|
|
|
|
|
|
PREPROC= decoder.rules preprocessor.rules
|
2006-02-04 08:15:42 -05:00
|
|
|
|
2008-02-12 09:13:32 -05:00
|
|
|
DOCS= AUTHORS CREDITS README README.* *.pdf TODO USAGE WISHLIST
|
|
|
|
|
|
|
|
# workaround conflicts between distpatches and patches
|
|
|
|
post-patch:
|
|
|
|
.if ${FLAVOR:L:Mflexresp}
|
|
|
|
@perl -pi -e "s,ip_t,snort_ip," ${WRKSRC}/src/preprocessors/stream.h
|
|
|
|
.endif
|
2006-10-10 09:33:17 -04:00
|
|
|
|
|
|
|
post-build:
|
|
|
|
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," \
|
|
|
|
${WRKSRC}/etc/snort.conf
|
2006-10-14 05:54:04 -04:00
|
|
|
@perl -pi -e "s,/usr/local/,${LOCALBASE}/," \
|
|
|
|
${WRKSRC}/etc/snort.conf
|
2006-10-10 09:33:17 -04:00
|
|
|
|
2000-05-29 03:31:38 -04:00
|
|
|
post-install:
|
2001-02-11 18:51:12 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/snort
|
2006-02-04 08:15:42 -05:00
|
|
|
.for i in ${CONFIGS}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/etc/${i} ${PREFIX}/share/examples/snort
|
|
|
|
.endfor
|
2008-02-12 09:13:32 -05:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/generators ${PREFIX}/share/examples/snort
|
|
|
|
|
|
|
|
.for i in ${PREPROC}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/preproc_rules/${i} ${PREFIX}/share/examples/snort
|
|
|
|
.endfor
|
2000-02-02 22:58:54 -05:00
|
|
|
|
2006-10-10 09:33:17 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/snort
|
|
|
|
.for j in ${DOCS}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/${j} ${PREFIX}/share/doc/snort
|
|
|
|
.endfor
|
|
|
|
|
2008-02-12 09:13:32 -05:00
|
|
|
NO_REGRESS= Yes
|
|
|
|
|
2000-02-02 22:58:54 -05:00
|
|
|
.include <bsd.port.mk>
|