Changeset 27123


Ignore:
Timestamp:
Jul 20, 2007, 5:26:04 AM (13 years ago)
Author:
boeyms@…
Message:

Revisions to www/nginx:

  • Install an example configuration file rather than a "live" one, and deal with the possibility that users of previous revisions might have changed the live configuration file, which will be clobbered on upgrade or uninstallation;
  • Add openmaintainer to list of maintainers;
  • Fix destroot.keepdirs to actually keep directories in destroot; and
  • Add descriptions to variants.
File:
1 edited

Legend:

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

    r25099 r27123  
    55name            nginx
    66version         0.5.20
     7revision        1
    78categories      www mail
    89platforms       darwin
    9 maintainers     boeyms@macports.org
     10maintainers     boeyms@macports.org openmaintainer@macports.org
    1011description     High-performance HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
    1112long_description    Nginx ("engine x") is a high-performance HTTP(S) server \
     
    4546
    4647build.target        build
    47 destroot.keepdirs   ${prefix}/var/log/${name} ${prefix}/var/run/${name}
     48destroot.keepdirs   ${destroot}${prefix}/var/log/${name} \
     49                    ${destroot}${prefix}/var/run/${name}
     50post-destroot {
     51    set nginx_conf ${prefix}/etc/${name}/${name}.conf
     52    move ${destroot}${nginx_conf} ${destroot}${nginx_conf}.example
     53# Try to cover for the fact that, in earlier revisions of this port, the
     54# configuration file was installed live instead of an example, in which case an
     55# upgrade will clobber any customisations that a user might have made :(
     56    catch "exec port provides ${nginx_conf}" provides_output
     57    set nginx_conf_is_registered_to_nginx \
     58        [regexp "${nginx_conf} is provided by: ${name}" ${provides_output}]
     59    set nginx_conf_differs \
     60        [catch {exec cmp ${nginx_conf} ${worksrcpath}/conf/${name}.conf}]
     61    if { ${nginx_conf_is_registered_to_nginx} && ${nginx_conf_differs} } {
     62        copy ${nginx_conf} ${nginx_conf}.altered
     63        ui_msg ""
     64        ui_msg "###############################################################"
     65        ui_msg "# It appears that you have altered ${nginx_conf},"
     66        ui_msg "# and that upgrading or uninstalling your previous installation"
     67        ui_msg "# of ${name} will clobber your copy.  It has been copied to"
     68        ui_msg "# ${nginx_conf}.altered for preservation when you upgrade or"
     69        ui_msg "# uninstall ${name}.  This problem should not occur with future"
     70        ui_msg "# upgrades or installations of this port.\n"
     71        ui_msg "###############################################################"
     72        ui_msg ""
     73    }
     74}
    4875
    4976startupitem.create      yes
     
    5178startupitem.pidfile     auto ${pidfile}
    5279
    53 variant dav {
     80variant dav description {Add WebDAV support to server} {
    5481    configure.args-append   --with-http_dav_module
    5582}
    5683
    57 variant flv {
     84variant flv description {Add FLV (Flash Video) streaming support to server} {
    5885    configure.args-append   --with-http_flv_module
    5986}
    6087
    61 variant mail {
     88variant mail description {Add IMAP4/POP3 mail proxy support} {
    6289    configure.args-append   --with-mail
    6390}
    6491
    65 variant ssl {
     92variant ssl description {Add SSL (HTTPS) support to the server, and\
     93        also to the mail proxy if that is enabled} {
    6694    depends_lib-append      port:openssl
    6795    configure.args-append   --with-http_ssl_module
Note: See TracChangeset for help on using the changeset viewer.