aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeech <beech@FreeBSD.org>2008-04-24 09:38:20 +0800
committerbeech <beech@FreeBSD.org>2008-04-24 09:38:20 +0800
commit3052223637cd28f98020a88b1c4d907319054fd4 (patch)
tree7f12edbf44b26b7b9143c3a89f619a6e8234005d
parentcdeee0adcf8ca84e85e12a51bc1407d946dfaeea (diff)
downloadfreebsd-ports-gnome-3052223637cd28f98020a88b1c4d907319054fd4.tar.gz
freebsd-ports-gnome-3052223637cd28f98020a88b1c4d907319054fd4.tar.zst
freebsd-ports-gnome-3052223637cd28f98020a88b1c4d907319054fd4.zip
- Add flexible response (v1) support to snort_inline. It borrows heavily from
the snort port, which also has this feature. Adds libnet10 as a dependency if this is chosen. - Add options, ODBC, POSTGRESQL, and MySQL support (plus flexible responses). - Add dependency on libnet10 if flexible responses is defined. - Bump portrevision - Note that flexible response v2 (needing libnet11) is unsupported due to libnet11 patches not applying cleanly. When this is cleared up for snort, it can be ported to snort_inline. PR: ports/121710 Submitted by: Yousif Hassan <yousif@alumni.jmu.edu> Approved by: maintainer timeout (1+ months)
-rw-r--r--security/snort_inline/Makefile35
1 files changed, 28 insertions, 7 deletions
diff --git a/security/snort_inline/Makefile b/security/snort_inline/Makefile
index 24e2f84a8071..9f81175b2b83 100644
--- a/security/snort_inline/Makefile
+++ b/security/snort_inline/Makefile
@@ -7,6 +7,7 @@
PORTNAME= snort_inline
PORTVERSION= 2.4.5
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://freebsd.rogness.net/ports/snort_inline/
@@ -22,6 +23,13 @@ CONFIGURE_ARGS+= --enable-inline --enable-ipfw
LIB_DEPENDS+= dnet:${PORTSDIR}/net/libdnet
+OPTIONS= MYSQL "With MySQL support" off \
+ ODBC "With ODBC support" off \
+ POSTGRESQL "With POSTGRESQL support" off \
+ FLEXRESP "With flexible responses (resp. w/packet resets)" off
+
+.include <bsd.port.pre.mk>
+
.if defined(WITH_MYSQL)
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
@@ -47,6 +55,22 @@ LDFLAGS+= -lssl -lcrypto
CONFIGURE_ARGS+= --with-postgresql=no
.endif
+.if defined(WITH_FLEXRESP)
+LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config
+
+.if exists(${LIBNET_CONFIG})
+LIBNET_CFLAGS!= ${LIBNET_CONFIG} --cflags
+LIBNET_LIBS!= ${LIBNET_CONFIG} --libs
+LIBNET_INCDIR= ${LIBNET_CFLAGS:M-I*:S/-I//}
+LIBNET_LIBDIR= ${LIBNET_LIBS:M-L*:S/-L//}
+.endif
+
+BUILD_DEPENDS+= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10
+CONFIGURE_ARGS+= --enable-flexresp \
+ --with-libnet-includes=${LIBNET_INCDIR} \
+ --with-libnet-libraries=${LIBNET_LIBDIR}
+.endif
+
MAN8= snort.8 snort_inline.8
DOCS= ChangeLog doc/AUTHORS doc/BUGS doc/CREDITS doc/faq* doc/NEWS \
doc/README* doc/TODO doc/USAGE doc/*.pdf
@@ -61,12 +85,9 @@ post-patch:
${REINPLACE_CMD} "s,$RULE_PATH/classification.config,${DATADIR}/classification.config," ${WRKSRC}/etc/snort_inline.conf
${REINPLACE_CMD} "s,$RULE_PATH/reference.config,${DATADIR}/reference.config," ${WRKSRC}/etc/snort_inline.conf
${REINPLACE_CMD} -e "s/^unicode.map/\/usr\/local\/share\/snort_inline\/unicode.map/" ${WRKSRC}/etc/snort_inline.conf
-
-pre-configure:
- @${ECHO} ""
- @${ECHO} "Set WITH_MYSQL, WITH_ODBC or WITH_POSTGRESQL"
- @${ECHO} "to get additional support."
- @${ECHO} ""
+.if defined(WITH_FLEXRESP)
+ ${REINPLACE_CMD} -e 's|libnet-config|${LIBNET_CONFIG}|g' ${WRKSRC}/configure
+.endif
post-install:
@${MKDIR} ${DATADIR}
@@ -97,4 +118,4 @@ post-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>