aboutsummaryrefslogtreecommitdiffstats
path: root/www/nginx-devel
diff options
context:
space:
mode:
Diffstat (limited to 'www/nginx-devel')
-rw-r--r--www/nginx-devel/Makefile75
-rw-r--r--www/nginx-devel/distinfo2
-rw-r--r--www/nginx-devel/files/nginx.sh32
-rw-r--r--www/nginx-devel/files/patch-conf-nginx.conf32
-rw-r--r--www/nginx-devel/pkg-descr5
-rw-r--r--www/nginx-devel/pkg-plist16
6 files changed, 162 insertions, 0 deletions
diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile
new file mode 100644
index 00000000000..b20ae5c36c9
--- /dev/null
+++ b/www/nginx-devel/Makefile
@@ -0,0 +1,75 @@
+# New ports collection makefile for: nginx
+# Date created: 11 Oct 2004
+# Whom: osa
+#
+# $FreeBSD$
+#
+
+PORTNAME= nginx
+PORTVERSION= 0.1.2
+CATEGORIES= www
+MASTER_SITES= http://sysoev.ru/nginx/
+
+MAINTAINER= osa@FreeBSD.org
+COMMENT= Robust and small WWW server
+
+VARDIR?= ${DESTDIR}/var
+LOGDIR?= ${VARDIR}/log
+RUNDIR?= ${VARDIR}/run
+HTTP_PORT?= 80
+
+USE_REINPLACE= yes
+USE_RC_SUBR= yes
+HAS_CONFIGURE= yes
+CONFIGURE_ENV+= LINK="${CC}"
+CONFIGURE_ARGS= --prefix=${PREFIX}/etc/nginx \
+ --with-cc-opt="-I ${PREFIX}/include" \
+ --with-ld-opt="-L ${PREFIX}/lib" \
+ --conf-path=${PREFIX}/etc/nginx/nginx.conf \
+ --sbin-path=${PREFIX}/sbin/nginx \
+ --pid-path=${RUNDIR}/nginx.pid \
+ --http-log-path=${LOGDIR}/nginx-access.log \
+ --error-log-path=${LOGDIR}/nginx-error.log \
+ --user=${WWWOWN} --group=${WWWGRP}
+
+.if defined(WITHOUT_HTTP_REWRITE_MODULE) || defined(WITHOUT_PCRE)
+PKGNAMESUFFIX= -nopcre
+CONFIGURE_ARGS+=--without-http_rewrite_module \
+ --without-pcre
+.else
+LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre
+.endif
+
+PLIST_FILES+= etc/nginx/koi-win \
+ etc/rc.d/nginx.sh \
+ sbin/nginx
+
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
+post-extract:
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/nginx.sh > ${WRKSRC}/nginx.sh
+
+post-patch:
+ @${REINPLACE_CMD} 's!%%HTTP_PORT%%!${HTTP_PORT}!; \
+ s!%%PREFIX%%!${PREFIX}!' \
+ ${WRKSRC}/conf/nginx.conf
+
+do-build:
+ @cd ${WRKSRC} && ${MAKE}
+
+do-install:
+ ${MKDIR} ${PREFIX}/etc/nginx ${PREFIX}/www/nginx-dist
+ ${INSTALL_SCRIPT} ${WRKSRC}/nginx.sh ${PREFIX}/etc/rc.d
+ ${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${PREFIX}/sbin
+ ${INSTALL_DATA} ${WRKSRC}/conf/koi-win ${PREFIX}/etc/nginx
+.for i in mime.types nginx.conf
+ [ -f ${PREFIX}/etc/nginx/${i} ] || \
+ ${INSTALL_DATA} ${WRKSRC}/conf/${i} ${PREFIX}/etc/nginx
+ ${INSTALL_DATA} ${WRKSRC}/conf/${i} ${PREFIX}/etc/nginx/${i}-dist
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/html/index.html ${PREFIX}/www/nginx-dist
+ ${ECHO_CMD} "" >>${PREFIX}/www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
+ ${LN} -sf ${PREFIX}/www/nginx-dist ${PREFIX}/www/nginx
+
+.include <bsd.port.mk>
diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo
new file mode 100644
index 00000000000..a74e96a2548
--- /dev/null
+++ b/www/nginx-devel/distinfo
@@ -0,0 +1,2 @@
+MD5 (nginx-0.1.2.tar.gz) = 520aa0e0cdb87d1dfb11963760feee9b
+SIZE (nginx-0.1.2.tar.gz) = 229971
diff --git a/www/nginx-devel/files/nginx.sh b/www/nginx-devel/files/nginx.sh
new file mode 100644
index 00000000000..dee8f0cad5b
--- /dev/null
+++ b/www/nginx-devel/files/nginx.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: nginx
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+# Define these apache_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/apache
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+nginx_enable=${nginx_enable-"NO"}
+nginx_flags=${nginx_flags-""}
+nginx_pidfile=${nginx_pidfile-"/var/run/nginx.pid"}
+
+. %%RC_SUBR%%
+
+name="nginx"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/nginx"
+
+load_rc_config $name
+
+pidfile="${nginx_pidfile}"
+
+start_cmd="echo \"Starting ${name}.\"; /usr/bin/limits -U www ${command} ${nginx_flags}"
+
+run_rc_command "$1"
diff --git a/www/nginx-devel/files/patch-conf-nginx.conf b/www/nginx-devel/files/patch-conf-nginx.conf
new file mode 100644
index 00000000000..734d51b9382
--- /dev/null
+++ b/www/nginx-devel/files/patch-conf-nginx.conf
@@ -0,0 +1,32 @@
+
+$FreeBSD$
+
+--- conf/nginx.conf.orig Wed Oct 20 14:46:31 2004
++++ conf/nginx.conf Thu Oct 21 19:47:18 2004
+@@ -12,7 +12,7 @@
+
+
+ http {
+- include conf/mime.types;
++ include mime.types;
+ default_type application/octet-stream;
+
+ sendfile on;
+@@ -20,7 +20,7 @@
+ #gzip on;
+
+ server {
+- listen 80;
++ listen %%HTTP_PORT%%;
+
+ charset on;
+ source_charset koi8-r;
+@@ -28,7 +28,7 @@
+ #access_log logs/access.log;
+
+ location / {
+- root html;
++ root %%PREFIX%%/www/nginx;
+ index index.html index.htm;
+ }
+
diff --git a/www/nginx-devel/pkg-descr b/www/nginx-devel/pkg-descr
new file mode 100644
index 00000000000..c2bc5e717da
--- /dev/null
+++ b/www/nginx-devel/pkg-descr
@@ -0,0 +1,5 @@
+Another one small and robust www server, supports
+kqueue (EV_CLEAR, EV_DISABLE, NOTE_LOWAT, EV_EOF, etc.),
+select, poll, sendfile.
+
+WWW: http://sysoev.ru/nginx/
diff --git a/www/nginx-devel/pkg-plist b/www/nginx-devel/pkg-plist
new file mode 100644
index 00000000000..4e4b4e62535
--- /dev/null
+++ b/www/nginx-devel/pkg-plist
@@ -0,0 +1,16 @@
+@comment $FreeBSD$
+@unexec if cmp -s %D/etc/nginx/mime.types %D/etc/nginx/mime.types-dist; then rm -f %D/etc/nginx/mime.types; fi
+etc/nginx/mime.types-dist
+@exec [ -f %B/mime.types ] || cp %B/%f %B/mime.types
+@unexec if cmp -s %D/etc/nginx/nginx.conf %D/etc/nginx/nginx.conf-dist; then rm -f %D/etc/nginx/nginx.conf; fi
+etc/nginx/nginx.conf-dist
+@exec [ -f %B/nginx.conf ] || cp %B/%f %B/nginx.conf
+@unexec rmdir $D/etc/nginx 2>/dev/null || true
+@exec mkdir -p -m 755 www/nginx-dist
+@comment @unexec chmod u+w www/nginx-dist
+www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
+@exec [ -d %D/www/nginx/ ] || ln -fs %B %D/www/nginx
+www/nginx-dist/index.html
+@exec chmod a-w www/nginx-dist
+@unexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; fi
+@dirrm www/nginx-dist