1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00

- Upgrade to 2.3.0 [1]

- Add WITH_PRELUDE knob to enable integration with Prelude IDS [2]

PR:             ports/76679 [1]
Submitted by:   Linh Pham <question+fbsdports@closedsrc.org> [1]
Prompted by:    Roberto Bosticardo <roberto.bosticardo@csp.it> [2]
This commit is contained in:
Sergei Kolobov 2005-02-07 09:35:32 +00:00
parent a5dfae1745
commit 1a2f2e3e0a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=128216
3 changed files with 48 additions and 9 deletions

View File

@ -6,9 +6,10 @@
#
PORTNAME= snort
PORTVERSION= 2.2.0
PORTVERSION= 2.3.0
CATEGORIES= security
MASTER_SITES= http://www.snort.org/dl/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= sergei@FreeBSD.org
COMMENT= Lightweight network intrusion detection system
@ -18,7 +19,8 @@ LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre
OPTIONS= FLEXRESP "Flexible response to events" off \
MYSQL "Enable MySQL support" off \
ODBC "Enable ODBC support" off \
POSTGRESQL "Enable PostgreSQL support" off
POSTGRESQL "Enable PostgreSQL support" off \
PRELUDE "Enable patch for Prelude integration" off
USE_GPG= yes
SIG_SUFFIX= .asc
@ -30,8 +32,8 @@ CONFIGURE_ENV= LDFLAGS="${LDFLAGS}"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
MAN8= snort.8
DOCS= ChangeLog doc/AUTHORS doc/BUGS doc/CREDITS doc/FAQ doc/NEWS \
doc/README* doc/TODO doc/USAGE doc/snort_manual.pdf
DOCS= ChangeLog doc/AUTHORS doc/BUGS doc/CREDITS doc/NEWS \
doc/README* doc/TODO doc/USAGE doc/*.pdf
.include <bsd.port.pre.mk>
@ -67,6 +69,27 @@ LDFLAGS+= -lssl -lcrypto
CONFIGURE_ARGS+= --with-postgresql=no
.endif
.if defined(WITH_PRELUDE)
#BROKEN= Prelude reporting patch have not been updated for Snort 2.2.0
PRELUDE_PATCH= 0.3.6
MASTER_SITES+= http://prelude-ids.org/download/releases/:prelude
SIGNED_FILES= ${DISTNAME}${EXTRACT_SUFX}
DISTFILES+= snort-prelude-reporting-patch-${PRELUDE_PATCH}.tar.gz:prelude
EXTRA_PATCHES+= ${WRKDIR}/snort-2.2.0-prelude-${PRELUDE_PATCH}.diff
USE_AUTOMAKE_VER= 19
USE_AUTOCONF_VER= 259
LIB_DEPENDS+= prelude.1:${PORTSDIR}/security/libprelude
CONFIGURE_ARGS+= --with-prelude=yes
PLIST_SUB+= PRELUDE=""
pre-configure:
cd ${WRKSRC} && ${ACLOCAL} && ${AUTOMAKE} && ${AUTOCONF}
${RM} ${WRKSRC}/doc/README.Prelude.orig
.else
CONFIGURE_ARGS+= --with-prelude=no
PLIST_SUB+= PRELUDE="@comment "
.endif
post-patch:
${REINPLACE_CMD} "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/src/snort.c
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
@ -91,6 +114,13 @@ post-install:
[ -f ${PREFIX}/etc/${f} ] || \
${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}
.endfor
.if defined(WITH_PRELUDE)
.for f in prelude-classification.config
${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample
[ -f ${PREFIX}/etc/${f} ] || \
${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}
.endfor
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}

View File

@ -1,4 +1,6 @@
MD5 (snort-2.2.0.tar.gz) = 6194278217e4e3f733b046256a31f0e6
SIZE (snort-2.2.0.tar.gz) = 2498466
MD5 (snort-2.2.0.tar.gz.asc) = 67a545445a19f8fad289875b24fabe2e
SIZE (snort-2.2.0.tar.gz.asc) = 189
MD5 (snort-2.3.0.tar.gz) = 89cdc22af9516cbafc359b452819947e
SIZE (snort-2.3.0.tar.gz) = 2633245
MD5 (snort-prelude-reporting-patch-0.3.6.tar.gz) = 323ab2956a59de113aa13099917f0d3a
SIZE (snort-prelude-reporting-patch-0.3.6.tar.gz) = 21964
MD5 (snort-2.3.0.tar.gz.asc) = 39619b69a909ba24206bc86e4ef46dc0
SIZE (snort-2.3.0.tar.gz.asc) = 189

View File

@ -9,16 +9,20 @@ etc/unicode.map-sample
@unexec if [ -f %D/etc/threshold.conf ] && cmp -s %D/etc/threshold.conf %D/etc/threshold.conf-sample; then rm -f %D/etc/threshold.conf; fi
etc/threshold.conf-sample
@exec [ -f %B/threshold.conf ] || cp %B/%f %B/threshold.conf
%%PRELUDE%%@unexec if [ -f %D/etc/prelude-classification.config ] && cmp -s %D/etc/prelude-classification.config %D/etc/prelude-classification.config-sample; then rm -f %D/etc/prelude-classification.config; fi
%%PRELUDE%%etc/prelude-classification.config-sample
%%PRELUDE%%@exec [ -f %B/prelude-classification.config ] || cp %B/%f %B/prelude-classification.config
etc/rc.d/snort.sh
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/BUGS
%%PORTDOCS%%%%DOCSDIR%%/CREDITS
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/FAQ
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.FLEXRESP
%%PORTDOCS%%%%DOCSDIR%%/README.INLINE
%%PORTDOCS%%%%DOCSDIR%%/README.PLUGINS
%%PORTDOCS%%%%PRELUDE%%%%DOCSDIR%%/README.Prelude
%%PORTDOCS%%%%DOCSDIR%%/README.UNSOCK
%%PORTDOCS%%%%DOCSDIR%%/README.WIN32
%%PORTDOCS%%%%DOCSDIR%%/README.alert_order
@ -30,11 +34,14 @@ etc/rc.d/snort.sh
%%PORTDOCS%%%%DOCSDIR%%/README.flowbits
%%PORTDOCS%%%%DOCSDIR%%/README.flow-portscan
%%PORTDOCS%%%%DOCSDIR%%/README.http_inspect
%%PORTDOCS%%%%DOCSDIR%%/README.sfportscan
%%PORTDOCS%%%%DOCSDIR%%/README.thresholding
%%PORTDOCS%%%%DOCSDIR%%/README.wireless
%%PORTDOCS%%%%DOCSDIR%%/TODO
%%PORTDOCS%%%%DOCSDIR%%/USAGE
%%PORTDOCS%%%%DOCSDIR%%/faq.pdf
%%PORTDOCS%%%%DOCSDIR%%/snort_manual.pdf
%%PORTDOCS%%%%DOCSDIR%%/snort_schema_v106.pdf
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%DATADIR%%/attack-responses.rules
%%DATADIR%%/backdoor.rules