Skip to content
Permalink
Browse files

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.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@40466 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Boey Maun Suang
Boey Maun Suang committed Oct 2, 2008
1 parent 8be0474 commit 168f35105f4becc727bb363bedcaca781dfe3e59
Showing with 16 additions and 12 deletions.
  1. +16 −12 www/nginx/Portfile
@@ -27,23 +27,27 @@ depends_lib port:pcre port:zlib

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 @@ post-destroot {

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

0 comments on commit 168f351

Please sign in to comment.
You can’t perform that action at this time.