2003-06-06 14:04:54 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= mod_security
|
2013-06-03 08:51:43 +02:00
|
|
|
PORTVERSION= 2.7.4
|
2013-07-11 18:26:26 +02:00
|
|
|
PORTREVISION= 2
|
2004-03-29 00:06:15 +02:00
|
|
|
CATEGORIES= www security
|
2013-04-16 12:58:15 +02:00
|
|
|
MASTER_SITES= http://www.modsecurity.org/tarball/${PORTVERSION}/
|
2010-05-25 22:17:37 +02:00
|
|
|
PKGNAMEPREFIX= ${APACHE_PKGNAMEPREFIX}
|
2008-06-25 02:41:42 +02:00
|
|
|
DISTNAME= ${PORTNAME:S/_//:S/2//}-apache_${PORTVERSION}
|
2003-06-06 14:04:54 +02:00
|
|
|
|
2008-06-25 02:41:42 +02:00
|
|
|
MAINTAINER= araujo@FreeBSD.org
|
2003-06-06 14:04:54 +02:00
|
|
|
COMMENT= An intrusion detection and prevention engine
|
2003-11-12 12:50:08 +01:00
|
|
|
|
2012-04-28 08:19:08 +02:00
|
|
|
LICENSE= AL2
|
2009-05-21 22:45:34 +02:00
|
|
|
|
2013-04-16 12:58:15 +02:00
|
|
|
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre \
|
2010-05-18 06:05:05 +02:00
|
|
|
apr-1:${PORTSDIR}/devel/apr1
|
2003-06-06 14:04:54 +02:00
|
|
|
|
2012-08-18 16:29:08 +02:00
|
|
|
USE_APACHE= 22+
|
2008-06-25 02:41:42 +02:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
AP_GENPLIST= yes
|
|
|
|
AP_INC= ${LOCALBASE}/include/libxml2
|
|
|
|
AP_LIB= ${LOCALBASE}/lib
|
|
|
|
USE_GNOME= libxml2
|
|
|
|
MODULENAME= mod_security2
|
|
|
|
SRC_FILE= *.c
|
|
|
|
PORTDOCS= *
|
|
|
|
DOCS= CHANGES LICENSE README.TXT modsecurity.conf-minimal
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${MODULENAME}
|
|
|
|
SUB_FILES+= mod_security2.conf
|
|
|
|
SUB_LIST+= APACHEETCDIR="${APACHEETCDIR}"
|
2012-05-13 19:01:51 +02:00
|
|
|
PLIST_FILES= etc/modsecurity.conf-example \
|
|
|
|
${APACHEMODDIR}/mod_security2.so \
|
|
|
|
bin/rules-updater.pl \
|
|
|
|
lib/mod_security2.so
|
2013-04-16 12:58:15 +02:00
|
|
|
|
|
|
|
OPTIONS_DEFINE= LUA MLOGC
|
|
|
|
MLOGC_DESC= Build ModSecurity Log Collector
|
2008-12-08 18:05:30 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
2008-06-25 02:41:42 +02:00
|
|
|
|
2013-04-16 12:58:15 +02:00
|
|
|
.if ${PORT_OPTIONS:MMLOGC}
|
|
|
|
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
|
|
|
|
CONFIGURE_ARGS+= --with-curl=${LOCALBASE} --disable-errors
|
|
|
|
PLIST_FILES+= bin/mlogc bin/mlogc-batch-load.pl
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-mlogc
|
2008-12-08 18:05:30 +01:00
|
|
|
.endif
|
2003-06-06 14:04:54 +02:00
|
|
|
|
2013-04-16 12:58:15 +02:00
|
|
|
.if ${PORT_OPTIONS:MLUA}
|
2008-07-20 19:59:44 +02:00
|
|
|
USE_LUA= 5.1+
|
|
|
|
CONFIGURE_ARGS+= --with-lua=${LOCALBASE}
|
2013-04-16 12:58:15 +02:00
|
|
|
LIB_DEPENDS+= lua-5.1.5:${PORTSDIR}/lang/lua
|
2008-07-20 19:59:44 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-lua
|
|
|
|
.endif
|
2012-04-28 08:19:08 +02:00
|
|
|
|
2008-06-25 02:41:42 +02:00
|
|
|
REINPLACE_ARGS= -i ""
|
2008-12-08 18:05:30 +01:00
|
|
|
AP_EXTRAS+= -DWITH_LIBXML2
|
2009-07-24 15:50:13 +02:00
|
|
|
CONFIGURE_ARGS+= --with-apxs=${APXS} --with-pcre=${LOCALBASE}
|
|
|
|
|
2008-12-08 18:05:30 +01:00
|
|
|
post-build:
|
2013-04-16 12:58:15 +02:00
|
|
|
.if ${PORT_OPTIONS:MMLOGC}
|
2008-12-08 18:05:30 +01:00
|
|
|
# XXX there is "mlogc-static" target in the Makefile, too
|
|
|
|
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} mlogc
|
|
|
|
.endif
|
|
|
|
|
2008-06-25 02:41:42 +02:00
|
|
|
post-install:
|
2012-04-28 08:19:08 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/modsecurity.conf-recommended ${PREFIX}/etc/modsecurity.conf-example
|
2003-06-06 14:04:54 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
2012-04-28 08:19:08 +02:00
|
|
|
@(cd ${WRKSRC} && ${COPYTREE_SHARE} "doc" ${DOCSDIR}/)
|
2008-06-25 02:41:42 +02:00
|
|
|
.endif
|
2013-04-16 12:58:15 +02:00
|
|
|
.if ${PORT_OPTIONS:MMLOGC}
|
2013-02-04 11:06:31 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mlogc/mlogc ${PREFIX}/bin/
|
2008-12-08 18:05:30 +01:00
|
|
|
.endif
|
2003-06-06 14:04:54 +02:00
|
|
|
|
2008-12-08 18:05:30 +01:00
|
|
|
.include <bsd.port.post.mk>
|