the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: nginx
Version: 1.0.1
Revision: 1
Description: Small, but powerful and efficient web server
License: BSD
Maintainer: Andreas Gockel
Depends: daemonic, pcre-shlibs
BuildDepends: fink (>= 0.24.12), pcre, system-openssl-dev
Provides: httpd
Source: http://nginx.org/download/%n-%v.tar.gz
Source-MD5: 4d4e70e3c6c907cb101c97e9cf9399c8
PatchFile: %n.patch
PatchFile-MD5: 04c7c365bd625d15a3392c5831157c01
PatchScript: /usr/bin/sed 's|@PREFIX@|%p|g' <%{PatchFile} | patch -p1
ConfigureParams: <<
--conf-path=%p/etc/%n/%n.conf --error-log-path=%p/var/log/%n/error.log\
--group=www --http-client-body-temp-path=%p/var/lib/%n/body\
--http-fastcgi-temp-path=%p/var/lib/%n/fastcgi\
--http-log-path=%p/var/log/%n/access.log\
--http-proxy-temp-path=%p/var/lib/%n/proxy\
--lock-path=%p/var/lock/%n/%n.lock --pid-path=%p/var/run/%n.pid\
--user=www --with-http_dav_module --with-http_flv_module\
--with-http_realip_module --with-http_ssl_module\
--with-http_stub_status_module --with-ipv6\
--http-uwsgi-temp-path=/tmp/%n-uwsgi\
--http-scgi-temp-path=/tmp/%n-scgi\
--http-fastcgi-temp-path=/tmp/%n-fastcgi\
--http-proxy-temp-path=/tmp/%n-proxy\
--http-client-body-temp-path=/tmp/%n-client
<<
InstallScript: <<
make -j1 install prefix=%p DESTDIR=%d
/usr/bin/install -d -m 775 %i/var/%n/www
/usr/bin/install -d -m 755 %i/var/{lib/%n{,/body,/fastcgi,/proxy},lock/%n}
/bin/mv %i/html/* %i/var/%n/www/
/bin/rmdir %i/html
/usr/bin/sed -i .removeme -e 's1log logs1log %p/var/log/%n1g' %i/etc/%n/%n.conf{,.default}
/usr/bin/sed -i .removeme -e 's1pid logs1pid %p/var/run/1g' %i/etc/%n/%n.conf{,.default}
/usr/bin/sed -i .removeme -e 's1#user nobody;1user www;1g' %i/etc/%n/%n.conf{,.default}
/usr/bin/sed -i .removeme -e 's1root html;1root %p/var/%n/www;1g' %i/etc/%n/%n.conf{,.default}
/usr/bin/find %i -name \*.removeme -delete
<<
DocFiles: CHANGES CHANGES.ru LICENSE README
PostInstScript: <<
#/bin/sh -ex
if [ "$1" = "configure" ]; then
/usr/sbin/chown -R www:www %p/var/log/%n %p/var/lib/%n %p/var/%n/www %p/var/lock/%n
%p/bin/daemonic install net.%n.%n
fi
if [ "$1" = "upgrade" ]; then
%p/bin/daemonic update net.%n.%n
fi
%p/bin/daemonic enable net.%n.%n
if [ -f %p/var/run/%n.pid ]; then
echo "Stopping %n"
killall %n 2>/dev/null
echo "Starting %n"
%p/sbin/%n
fi
<<
PreRmScript: <<
#/bin/sh -ex
if [ "$1" != "upgrade" ]; then
if [ -f %p/var/run/%n.pid ]; then
echo "Stopping %n"
killall %n 2>/dev/null
fi
%p/bin/daemonic disable net.%n.%n
fi
<<
ConfFiles: <<
%p/etc/%n/fastcgi_params %p/etc/%n/fastcgi_params.default %p/etc/%n/koi-utf
%p/etc/%n/koi-win %p/etc/%n/mime.types %p/etc/%n/mime.types.default
%p/etc/%n/%n.conf %p/etc/%n/%n.conf.default %p/etc/%n/win-utf
<<
DaemonicName: net.%n.%n
DaemonicFile: <<
<<
Homepage: http://nginx.org/
DescDetail: <<
Nginx (engine x) is a web server created by Igor Sysoev and kindly provided
to the open-source community. This server can be used as standalone HTTP
server and as a reverse proxy server before some Apache or another big
server to reduce load to backend servers by many concurrent HTTP-sessions.
<<
InfoTest: <<
TestScript: echo "Nothing to test here"
<<
diff -rauN nginx-0.7.61/auto/lib/pcre/conf nginx-0.7.61-p1/auto/lib/pcre/conf
--- nginx-0.7.61/auto/lib/pcre/conf 2009-06-15 08:49:53.000000000 +0000
+++ nginx-0.7.61-p1/auto/lib/pcre/conf 2009-07-29 05:40:04.000000000 +0000
@@ -154,7 +154,32 @@
. auto/feature
fi
+
+ if [ $ngx_found = yes ]; then
+ CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
+ CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
+ CORE_INCS="$CORE_INCS $ngx_feature_path"
+ CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
+ PCRE=YES
+ ngx_found=no
+
+ else
+ # Fink
+ if [ $PCRE = NO ]; then
+
+ ngx_feature="PCRE library in @PREFIX@/"
+ ngx_feature_name="NGX_PCRE"
+ ngx_feature_run=no
+ ngx_feature_incs="#include
+ ngx_feature_path="@PREFIX@/include"
+ ngx_feature_libs="-L@PREFIX@/lib -lpcre"
+ ngx_feature_test="pcre *re;
+ re = pcre_compile(NULL, 0, NULL, 0, NULL)"
+ . auto/feature
+ fi
+ fi
+
if [ $ngx_found = yes ]; then
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"