summaryrefslogtreecommitdiff
path: root/www/nginx
diff options
context:
space:
mode:
authorimil <imil@pkgsrc.org>2012-04-21 10:32:47 +0000
committerimil <imil@pkgsrc.org>2012-04-21 10:32:47 +0000
commit7fa2cec781fd313353d28c656c9699b1b616a4c4 (patch)
tree822403f92cd02f45efb8e6239ffba816e3dafe1c /www/nginx
parenteccede38164ac4226c64d74637f7b152552d2dab (diff)
downloadpkgsrc-7fa2cec781fd313353d28c656c9699b1b616a4c4.tar.gz
Added the naxsi (http://code.google.com/p/naxsi/) module, an applicative
firewall for nginx.
Diffstat (limited to 'www/nginx')
-rw-r--r--www/nginx/Makefile16
-rw-r--r--www/nginx/PLIST3
-rw-r--r--www/nginx/distinfo5
-rw-r--r--www/nginx/options.mk18
4 files changed, 33 insertions, 9 deletions
diff --git a/www/nginx/Makefile b/www/nginx/Makefile
index bb4e9d5e0e0..e901974bcf1 100644
--- a/www/nginx/Makefile
+++ b/www/nginx/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2012/04/17 21:12:42 shattered Exp $
+# $NetBSD: Makefile,v 1.22 2012/04/21 10:32:47 imil Exp $
DISTNAME= nginx-1.0.15
CATEGORIES= www
@@ -50,12 +50,18 @@ CONFIGURE_ARGS+= --http-fastcgi-temp-path=${NGINX_DATADIR}/fstcgi_temp
PKG_SYSCONFSUBDIR= nginx
+.include "options.mk"
+
EGDIR= ${PREFIX}/share/examples/nginx
EGFILES+= fastcgi.conf fastcgi_params koi-utf koi-win \
mime.types nginx.conf win-utf
.for file in ${EGFILES}
-CONF_FILES+= ${EGDIR}/conf/${file} ${PKG_SYSCONFDIR}/${file}
+CONF_FILES+= ${EGDIR}/conf/${file} ${PKG_SYSCONFDIR}/${file}
+. if !empty(PKG_OPTIONS:Mnaxsi)
+CONF_FILES+= ${EGDIR}/conf/naxsi_core.rules
+CONF_FILES+= ${PKG_SYSCONFDIR}/naxsi_core.rules
+. endif
.endfor
RCD_SCRIPTS= nginx
@@ -80,8 +86,6 @@ SUBST_SED.paths+= -e 's,%%NGINX_GROUP%%,${NGINX_GROUP},g'
MESSAGE_SUBST+= NGINX_LOGDIR=${NGINX_LOGDIR}
MESSAGE_SUBST+= NGINX_PIDDIR=${NGINX_PIDDIR}
-.include "options.mk"
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${DESTDIR}${PREFIX}/sbin/nginx
.for file in ${EGFILES}
@@ -90,6 +94,10 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/html/50x.html ${DESTDIR}${EGDIR}/html/50x.html
${INSTALL_DATA} ${WRKSRC}/html/index.html ${DESTDIR}${EGDIR}/html/index.html
${INSTALL_MAN} ${WRKSRC}/man/nginx.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+.if !empty(PKG_OPTIONS:Mnaxsi)
+ ${INSTALL_DATA} ${WRKDIR}/${NAXSI}/naxsi_config/naxsi_core.rules ${DESTDIR}${EGDIR}/conf
+.endif
+
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/nginx/PLIST b/www/nginx/PLIST
index 82a6ef72da1..c2e627123b3 100644
--- a/www/nginx/PLIST
+++ b/www/nginx/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2011/06/10 10:36:18 joerg Exp $
+@comment $NetBSD: PLIST,v 1.6 2012/04/21 10:32:47 imil Exp $
man/man8/nginx.8
sbin/nginx
share/examples/nginx/conf/fastcgi.conf
@@ -8,6 +8,7 @@ share/examples/nginx/conf/koi-win
share/examples/nginx/conf/mime.types
share/examples/nginx/conf/nginx.conf
${PLIST.uwsgi}share/examples/nginx/conf/uwsgi_params
+${PLIST.naxsi}share/examples/nginx/conf/naxsi_core.rules
share/examples/nginx/conf/win-utf
share/examples/nginx/html/50x.html
share/examples/nginx/html/index.html
diff --git a/www/nginx/distinfo b/www/nginx/distinfo
index 07076fc67dd..eb312097e5d 100644
--- a/www/nginx/distinfo
+++ b/www/nginx/distinfo
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.17 2012/04/17 21:12:42 shattered Exp $
+$NetBSD: distinfo,v 1.18 2012/04/21 10:32:47 imil Exp $
+SHA1 (naxsi-0.45.tgz) = e1f29219fc9f7d3b39c4abfac558816f6046363b
+RMD160 (naxsi-0.45.tgz) = bbb535c3f22c4951263a80a962ea0d8fa2208cbd
+Size (naxsi-0.45.tgz) = 175358 bytes
SHA1 (nginx-1.0.15.tar.gz) = e506b301ea849f58f2efb499d77b819fe55eea9a
RMD160 (nginx-1.0.15.tar.gz) = 99653499916b81fb0f5842755484983606cea5ec
Size (nginx-1.0.15.tar.gz) = 693025 bytes
diff --git a/www/nginx/options.mk b/www/nginx/options.mk
index 81629b554b1..8a2f44dbdb7 100644
--- a/www/nginx/options.mk
+++ b/www/nginx/options.mk
@@ -1,12 +1,12 @@
-# $NetBSD: options.mk,v 1.13 2012/03/13 10:00:14 fhajny Exp $
+# $NetBSD: options.mk,v 1.14 2012/04/21 10:32:47 imil Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.nginx
-PKG_SUPPORTED_OPTIONS= dav flv gtools inet6 mail-proxy memcache pcre \
+PKG_SUPPORTED_OPTIONS= dav flv gtools inet6 mail-proxy memcache naxsi pcre \
push realip ssl sub uwsgi image-filter upload debug \
status
PKG_SUGGESTED_OPTIONS= pcre ssl
-PLIST_VARS+= uwsgi
+PLIST_VARS+= naxsi uwsgi
.include "../../mk/bsd.options.mk"
@@ -51,6 +51,18 @@ CONFIGURE_ARGS+= --with-mail
CONFIGURE_ARGS+= --without-http_memcached_module
.endif
+.if !empty(PKG_OPTIONS:Mnaxsi)
+PLIST.naxsi= yes
+CONFIGURE_ARGS+= --add-module=../${NAXSI}/naxsi_src
+.endif
+
+.if !empty(PKG_OPTIONS:Mnaxsi) || make(makesum)
+NAXSI= naxsi-0.45
+NAXSI_DISTFILE= ${NAXSI}.tgz
+SITES.${NAXSI_DISTFILE}= http://naxsi.googlecode.com/files/
+DISTFILES+= ${NAXSI_DISTFILE}
+.endif
+
.if !empty(PKG_OPTIONS:Mrealip)
CONFIGURE_ARGS+= --with-http_realip_module
.endif