pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/nginx Import nginx (pronounced "engine X") from pk...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ac26ed48f1da
branches:  trunk
changeset: 536334:ac26ed48f1da
user:      ghen <ghen%pkgsrc.org@localhost>
date:      Tue Dec 11 09:12:26 2007 +0000

description:
Import nginx (pronounced "engine X") from pkgsrc-wip, a lightweight web (HTTP)
server/reverse proxy and mail (IMAP/POP3) proxy.

diffstat:

 www/nginx/DESCR            |  10 +++++
 www/nginx/Makefile         |  60 ++++++++++++++++++++++++++++++++
 www/nginx/PLIST            |  14 +++++++
 www/nginx/distinfo         |   6 +++
 www/nginx/files/nginx.sh   |  17 +++++++++
 www/nginx/options.mk       |  19 ++++++++++
 www/nginx/patches/patch-aa |  86 ++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 212 insertions(+), 0 deletions(-)

diffs (240 lines):

diff -r 782be773eb84 -r ac26ed48f1da www/nginx/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/DESCR   Tue Dec 11 09:12:26 2007 +0000
@@ -0,0 +1,10 @@
+nginx (pronounced "engine X") is a lightweight web (HTTP) server/reverse proxy
+and mail (IMAP/POP3) proxy written by Igor Sysoev.
+
+nginx has been running for more than three years on many heavily loaded Russian
+sites including Rambler (RamblerMedia.com).  In March 2007 about 20% of all
+Russian virtual hosts were served or proxied by nginx.  According to Google
+Online Security Blog nginx serves or proxies about 4% of all Internet virtual
+hosts, although Netcraft shows much less percent.
+
+The sources are licensed under a BSD-like license.
diff -r 782be773eb84 -r ac26ed48f1da www/nginx/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/Makefile        Tue Dec 11 09:12:26 2007 +0000
@@ -0,0 +1,60 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/12/11 09:12:26 ghen Exp $
+
+DISTNAME=              nginx-0.5.33
+CATEGORIES=            www
+MASTER_SITES=          http://sysoev.ru/nginx/
+
+MAINTAINER=            ghen%NetBSD.org@localhost
+HOMEPAGE=              http://nginx.net/
+COMMENT=               Lightweight HTTP server and mail proxy server
+
+USE_PKGLOCALEDIR=      yes
+HAS_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --with-ld-opt=-L${PREFIX}/lib\ -Wl,-R${PREFIX}/lib
+CONFIGURE_ARGS+=       --prefix=${PREFIX}
+CONFIGURE_ARGS+=       --sbin-path=${PREFIX}/sbin
+CONFIGURE_ARGS+=       --conf-path=${PKG_SYSCONFDIR}/nginx.conf
+CONFIGURE_ARGS+=       --pid-path=${VARBASE}/run/nginx.pid
+CONFIGURE_ARGS+=       --error-log-path=${NGINX_LOGDIR}/error.log
+CONFIGURE_ARGS+=       --http-log-path=${NGINX_LOGDIR}/access.log
+CONFIGURE_ARGS+=       --with-mail
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_SYSCONFSUBDIR=     nginx
+NGINX_LOGDIR?=         ${VARBASE}/log/nginx
+
+EGDIR=                 ${PREFIX}/share/examples/nginx
+EGFILES=               fastcgi_params koi-utf koi-win mime.types nginx.conf win-utf
+
+.for file in ${EGFILES}
+CONF_FILES+=           ${EGDIR:Q}/conf/${file} ${PKG_SYSCONFDIR}/${file}
+.endfor
+
+RCD_SCRIPTS=           nginx
+
+INSTALLATION_DIRS=     sbin share/examples/nginx/conf share/examples/nginx/html
+OWN_DIRS=              ${NGINX_LOGDIR}
+
+BUILD_DEFS+=           PKG_SYSCONFBASE NGINX_LOGDIR VARBASE
+
+BUILD_TARGET=          build
+
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=     conf/nginx.conf
+SUBST_SED.paths=       -e 's,%%PKG_SYSCONFDIR%%,${PKG_SYSCONFDIR},g'
+SUBST_SED.paths+=      -e 's,%%NGINX_LOGDIR%%,${NGINX_LOGDIR},g'
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${PREFIX}/sbin/nginx
+.for file in ${EGFILES}
+       ${INSTALL_DATA} ${WRKSRC}/conf/${file} ${EGDIR}/conf/${file}
+.endfor
+       ${INSTALL_DATA} ${WRKSRC}/html/50x.html ${EGDIR}/html/50x.html
+       ${INSTALL_DATA} ${WRKSRC}/html/index.html ${EGDIR}/html/index.html
+
+.include "options.mk"
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 782be773eb84 -r ac26ed48f1da www/nginx/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/PLIST   Tue Dec 11 09:12:26 2007 +0000
@@ -0,0 +1,14 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/12/11 09:12:26 ghen Exp $
+sbin/nginx
+share/examples/nginx/conf/fastcgi_params
+share/examples/nginx/conf/koi-utf
+share/examples/nginx/conf/koi-win
+share/examples/nginx/conf/mime.types
+share/examples/nginx/conf/nginx.conf
+share/examples/nginx/conf/win-utf
+share/examples/nginx/html/50x.html
+share/examples/nginx/html/index.html
+share/examples/rc.d/nginx
+@dirrm share/examples/nginx/html
+@dirrm share/examples/nginx/conf
+@dirrm share/examples/nginx
diff -r 782be773eb84 -r ac26ed48f1da www/nginx/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/distinfo        Tue Dec 11 09:12:26 2007 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/12/11 09:12:26 ghen Exp $
+
+SHA1 (nginx-0.5.33.tar.gz) = d8c321126c57d3a5cf06914541465bf44a6f3904
+RMD160 (nginx-0.5.33.tar.gz) = 1836b4019f450b562bbffade6ea2046f6b640062
+Size (nginx-0.5.33.tar.gz) = 485441 bytes
+SHA1 (patch-aa) = ffc4de0134bd3d1808bdd1462e4602a11159d996
diff -r 782be773eb84 -r ac26ed48f1da www/nginx/files/nginx.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/files/nginx.sh  Tue Dec 11 09:12:26 2007 +0000
@@ -0,0 +1,17 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: nginx.sh,v 1.1.1.1 2007/12/11 09:12:26 ghen Exp $
+#
+# PROVIDE: nginx
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="nginx"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+pidfile="@VARBASE@/run/${name}.pid"
+
+load_rc_config $name
+run_rc_command "$1"
diff -r 782be773eb84 -r ac26ed48f1da www/nginx/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/options.mk      Tue Dec 11 09:12:26 2007 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1.1.1 2007/12/11 09:12:26 ghen Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.nginx
+PKG_SUPPORTED_OPTIONS= ssl pcre
+PKG_SUGGESTED_OPTIONS= ssl pcre
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mssl)
+.include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-mail_ssl_module
+.endif
+
+.if !empty(PKG_OPTIONS:Mpcre)
+.include "../../devel/pcre/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --without-pcre
+CONFIGURE_ARGS+=       --without-http_rewrite_module
+.endif
diff -r 782be773eb84 -r ac26ed48f1da www/nginx/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nginx/patches/patch-aa        Tue Dec 11 09:12:26 2007 +0000
@@ -0,0 +1,86 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/12/11 09:12:26 ghen Exp $
+
+--- conf/nginx.conf.orig       2007-01-18 08:08:18.000000000 +0100
++++ conf/nginx.conf
+@@ -2,11 +2,11 @@
+ #user  nobody;
+ worker_processes  1;
+ 
+-#error_log  logs/error.log;
+-#error_log  logs/error.log  notice;
+-#error_log  logs/error.log  info;
++#error_log  %%NGINX_LOGDIR%%/error.log;
++#error_log  %%NGINX_LOGDIR%%/error.log  notice;
++#error_log  %%NGINX_LOGDIR%%/error.log  info;
+ 
+-#pid        logs/nginx.pid;
++#pid        %%NGINX_LOGDIR%%/nginx.pid;
+ 
+ 
+ events {
+@@ -15,14 +15,14 @@ events {
+ 
+ 
+ http {
+-    include       conf/mime.types;
++    include       %%PKG_SYSCONFDIR%%/mime.types;
+     default_type  application/octet-stream;
+ 
+     #log_format  main  '$remote_addr - $remote_user [$time_local] $request '
+     #                  '"$status" $body_bytes_sent "$http_referer" '
+     #                  '"$http_user_agent" "$http_x_forwarded_for"';
+ 
+-    #access_log  logs/access.log  main;
++    #access_log  %%NGINX_LOGDIR%%/access.log  main;
+ 
+     sendfile        on;
+     #tcp_nopush     on;
+@@ -38,10 +38,10 @@ http {
+ 
+         #charset koi8-r;
+ 
+-        #access_log  logs/host.access.log  main;
++        #access_log  %%NGINX_LOGDIR%%/host.access.log  main;
+ 
+         location / {
+-            root   html;
++            root   share/examples/nginx/html;
+             index  index.html index.htm;
+         }
+ 
+@@ -51,7 +51,7 @@ http {
+         #
+         error_page   500 502 503 504  /50x.html;
+         location = /50x.html {
+-            root   html;
++            root   share/examples/nginx/html;
+         }
+ 
+         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+@@ -66,7 +66,7 @@ http {
+         #    fastcgi_pass   127.0.0.1:9000;
+         #    fastcgi_index  index.php;
+         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
+-        #    include        conf/fastcgi_params;
++        #    include        %%PKG_SYSCONFDIR%%/fastcgi_params;
+         #}
+ 
+         # deny access to .htaccess files, if Apache's document root
+@@ -86,7 +86,7 @@ http {
+     #    server_name  somename  alias  another.alias;
+ 
+     #    location / {
+-    #        root   html;
++    #        root   share/examples/nginx/html;
+     #        index  index.html index.htm;
+     #    }
+     #}
+@@ -109,7 +109,7 @@ http {
+     #    ssl_prefer_server_ciphers   on;
+ 
+     #    location / {
+-    #        root   html;
++    #        root   share/examples/nginx/html;
+     #        index  index.html index.htm;
+     #    }
+     #}



Home | Main Index | Thread Index | Old Index