[40466] trunk/dports/www/nginx/Portfile
boeyms at macports.org
boeyms at macports.org
Thu Oct 2 10:34:55 PDT 2008
Revision: 40466
http://trac.macports.org/changeset/40466
Author: boeyms at macports.org
Date: 2008-10-02 10:34:55 -0700 (Thu, 02 Oct 2008)
Log Message:
-----------
nginx: factor out multiply-used base paths into separate variables
In particular, there are multiple locations in the portfile that require
reference to the configuration, log and runtime directories for nginx. The
creation of variables to store these paths has been done in order to make it
easier to understand and maintain the Portfile.
Modified Paths:
--------------
trunk/dports/www/nginx/Portfile
Modified: trunk/dports/www/nginx/Portfile
===================================================================
--- trunk/dports/www/nginx/Portfile 2008-10-02 17:34:10 UTC (rev 40465)
+++ trunk/dports/www/nginx/Portfile 2008-10-02 17:34:55 UTC (rev 40466)
@@ -27,23 +27,27 @@
patchfiles patch-auto__install.diff patch-conf__nginx.conf.diff
-set pidfile ${prefix}/var/run/${name}.pid
+set nginx_confdir ${prefix}/etc/${name}
+set nginx_logdir ${prefix}/var/log/${name}
+set nginx_rundir ${prefix}/var/run/${name}
+set nginx_pidfile ${nginx_rundir}/${name}.pid
+
configure.args-append \
--with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \
--with-ld-opt=\"${configure.ldflags}\" \
- --conf-path=${prefix}/etc/${name}/${name}.conf \
- --error-log-path=${prefix}/var/log/${name}/error.log \
- --http-log-path=${prefix}/var/log/${name}/access.log \
- --pid-path=${pidfile} \
- --lock-path=${prefix}/var/run/${name}.lock \
- --http-client-body-temp-path=${prefix}/var/run/${name}/client_body_temp \
- --http-proxy-temp-path=${prefix}/var/run/${name}/proxy_temp \
- --http-fastcgi-temp-path=${prefix}/var/run/${name}/fastcgi_temp
+ --conf-path=${nginx_confdir}/${name}.conf \
+ --error-log-path=${nginx_logdir}/error.log \
+ --http-log-path=${nginx_logdir}/access.log \
+ --pid-path=${nginx_pidfile} \
+ --lock-path=${nginx_rundir}/${name}.lock \
+ --http-client-body-temp-path=${nginx_rundir}/client_body_temp \
+ --http-proxy-temp-path=${nginx_rundir}/proxy_temp \
+ --http-fastcgi-temp-path=${nginx_rundir}/fastcgi_temp
build.target build
-destroot.keepdirs ${destroot}${prefix}/var/log/${name} \
- ${destroot}${prefix}/var/run/${name}
+destroot.keepdirs ${destroot}${nginx_logdir} \
+ ${destroot}${nginx_rundir}
post-destroot {
set nginx_conf ${prefix}/etc/${name}/${name}.conf
@@ -73,7 +77,7 @@
startupitem.create yes
startupitem.executable ${prefix}/sbin/nginx
-startupitem.pidfile auto ${pidfile}
+startupitem.pidfile auto ${nginx_pidfile}
variant dav description {Add WebDAV support to server} {
configure.args-append --with-http_dav_module
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081002/04cd95e9/attachment.html
More information about the macports-changes
mailing list