Changeset 40466


Ignore:
Timestamp:
Oct 2, 2008, 5:34:55 PM (12 years ago)
Author:
boeyms@…
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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/www/nginx/Portfile

    r40464 r40466  
    2828patchfiles      patch-auto__install.diff patch-conf__nginx.conf.diff
    2929
    30 set pidfile     ${prefix}/var/run/${name}.pid
     30set nginx_confdir       ${prefix}/etc/${name}
     31set nginx_logdir        ${prefix}/var/log/${name}
     32set nginx_rundir        ${prefix}/var/run/${name}
     33
     34set nginx_pidfile       ${nginx_rundir}/${name}.pid
    3135
    3236configure.args-append \
    3337            --with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \
    3438            --with-ld-opt=\"${configure.ldflags}\" \
    35             --conf-path=${prefix}/etc/${name}/${name}.conf \
    36             --error-log-path=${prefix}/var/log/${name}/error.log \
    37             --http-log-path=${prefix}/var/log/${name}/access.log \
    38             --pid-path=${pidfile} \
    39             --lock-path=${prefix}/var/run/${name}.lock \
    40             --http-client-body-temp-path=${prefix}/var/run/${name}/client_body_temp \
    41             --http-proxy-temp-path=${prefix}/var/run/${name}/proxy_temp \
    42             --http-fastcgi-temp-path=${prefix}/var/run/${name}/fastcgi_temp
     39            --conf-path=${nginx_confdir}/${name}.conf \
     40            --error-log-path=${nginx_logdir}/error.log \
     41            --http-log-path=${nginx_logdir}/access.log \
     42            --pid-path=${nginx_pidfile} \
     43            --lock-path=${nginx_rundir}/${name}.lock \
     44            --http-client-body-temp-path=${nginx_rundir}/client_body_temp \
     45            --http-proxy-temp-path=${nginx_rundir}/proxy_temp \
     46            --http-fastcgi-temp-path=${nginx_rundir}/fastcgi_temp
    4347
    4448build.target        build
    45 destroot.keepdirs   ${destroot}${prefix}/var/log/${name} \
    46                     ${destroot}${prefix}/var/run/${name}
     49destroot.keepdirs   ${destroot}${nginx_logdir} \
     50                    ${destroot}${nginx_rundir}
    4751
    4852post-destroot {
     
    7478startupitem.create      yes
    7579startupitem.executable  ${prefix}/sbin/nginx
    76 startupitem.pidfile     auto ${pidfile}
     80startupitem.pidfile     auto ${nginx_pidfile}
    7781
    7882variant dav description {Add WebDAV support to server} {
Note: See TracChangeset for help on using the changeset viewer.