freebsd-ports/www/mod_security/Makefile
Adam Weinberger a0d9e076d7 Update to 2.9.0.
Changes:
- update ModSecurity to 2.9.0 (released Feb 12, 2015)
- add JSON parsing support via devel/yajl
- add support for loading remote configuration, which depends on ftp/curl
- add optional support for fuzzy hashes via security/ssdeep
- fix: use lua51 only, ModSecurity does not support lua 5.2 yet
- add FreeBSD specific README with installation and configuration hints
- pkg-message: refer uses to README
- install recommended modsecurity.conf using .sample config file convention
- port skeleton cleanups

PR:		197833
Submitted by:	maintainer (Walter Hop)
2015-04-24 21:19:39 +00:00

85 lines
2.3 KiB
Makefile

# $FreeBSD$
PORTNAME= mod_security
PORTVERSION= 2.9.0
CATEGORIES= www security
MASTER_SITES= http://www.modsecurity.org/tarball/${PORTVERSION}/
PKGNAMEPREFIX= ${APACHE_PKGNAMEPREFIX}
DISTNAME= ${PORTNAME:S/_//:S/2//}-${PORTVERSION}
MAINTAINER= walter@lifeforms.nl
COMMENT= Intrusion detection and prevention engine
LICENSE= APACHE20
LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre \
libapr-1.so:${PORTSDIR}/devel/apr1 \
libyajl.so:${PORTSDIR}/devel/yajl \
libcurl.so:${PORTSDIR}/ftp/curl
USE_APACHE= 22+
USE_GNOME= libxml2
GNU_CONFIGURE= yes
USES= perl5 pkgconfig shebangfix
SHEBANG_FILES= tools/rules-updater.pl.in mlogc/mlogc-batch-load.pl.in
perl_OLD_CMD= @PERL@
AP_INC= ${LOCALBASE}/include/libxml2
AP_LIB= ${LOCALBASE}/lib
MODULENAME= mod_security2
SRC_FILE= *.c
PORTDOCS= *
DOCSDIR= ${PREFIX}/share/doc/${MODULENAME}
SUB_FILES+= pkg-message
SUB_FILES+= README
SUB_LIST+= APACHEETCDIR="${APACHEETCDIR}"
SUB_LIST+= APACHEMODDIR="${APACHEMODDIR}"
PLIST_SUB+= APXS="${APXS}"
PLIST_SUB+= APACHEMODDIR="${APACHEMODDIR}"
OPTIONS_DEFINE= DOCS FUZZYHASH LUA MLOGC
OPTIONS_SUB= yes
LUA_CONFIGURE_ON= --with-lua=${LOCALBASE}
LUA_CONFIGURE_OFF+= --without-lua
LUA_USES= lua:51
MLOGC_DESC= Build ModSecurity Log Collector
MLOGC_CONFIGURE_ON= --disable-errors
MLOGC_CONFIGURE_OFF= --disable-mlogc
FUZZYHASH_DESC= Allow matching contents using fuzzy hashes with ssdeep
FUZZYHASH_CONFIGURE_ON= --with-ssdeep=${LOCALBASE}
FUZZYHASH_CONFIGURE_OFF=--without-ssdeep
FUZZYHASH_LIB_DEPENDS= libfuzzy.so:${PORTSDIR}/security/ssdeep
ETCDIR= ${PREFIX}/etc/modsecurity
# ap2x- prefix OPTIONSFILE fix
OPTIONSFILE= ${PORT_DBDIR}/www_mod_security/options
REINPLACE_ARGS= -i ""
AP_EXTRAS+= -DWITH_LIBXML2
CONFIGURE_ARGS+=--with-apxs=${APXS} --with-pcre=${LOCALBASE} --with-yajl=${LOCALBASE} --with-curl=${LOCALBASE}
post-patch:
@${REINPLACE_CMD} -e "s/lua5.1/lua-${LUA_VER}/g" ${WRKSRC}/configure
pre-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}
post-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/modsecurity.conf-recommended \
${STAGEDIR}${ETCDIR}/modsecurity.conf.sample
${INSTALL_DATA} ${WRKSRC}/unicode.mapping \
${STAGEDIR}${ETCDIR}/unicode.mapping
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} doc ${STAGEDIR}${DOCSDIR})
${INSTALL_DATA} ${WRKDIR}/README ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>