[125927] trunk/dports/www/nginx/Portfile

cal at macports.org cal at macports.org
Mon Sep 29 12:54:09 PDT 2014


Revision: 125927
          https://trac.macports.org/changeset/125927
Author:   cal at macports.org
Date:     2014-09-29 12:54:09 -0700 (Mon, 29 Sep 2014)
Log Message:
-----------
nginx: update to 1.7.5 mainline

Apparently nginx "mainline" is no longer "unstable" or "development" as it
previously was. As such, it probably makes sense to track that version. I also
received a few requests suggesting that.

Furthermore:
 - Install the sample configuration files in $prefix/share/nginx/examples and
   copy them to $prefix/etc/nginx on activation if they don't exist yet. Closes
   #44463.
 - Update the upload progress module to 0.9.1
 - Update the HTTP Redis module to 0.3.7
 - Update the RTMP module to 1.1.5. This one is currently broken with 1.7.5,
   a future release will apparently fix that, upstream is aware of the issue.
 - Update the HTTP push module to 0.73
 - Update the Lua module to 0.9.12. This one is also broken with 1.7.5.
 - Fix livecheck to point to mainline instead

Modified Paths:
--------------
    trunk/dports/www/nginx/Portfile

Modified: trunk/dports/www/nginx/Portfile
===================================================================
--- trunk/dports/www/nginx/Portfile	2014-09-29 18:58:31 UTC (rev 125926)
+++ trunk/dports/www/nginx/Portfile	2014-09-29 19:54:09 UTC (rev 125927)
@@ -4,7 +4,7 @@
 PortSystem          1.0
 
 name                nginx
-version             1.6.2
+version             1.7.5
 categories          www mail
 platforms           darwin
 license             BSD
@@ -25,7 +25,7 @@
                     http://www.grid.net.ru/nginx/download/:upload_module \
                     googlecode:mod-zip:zip_module \
                     http://people.freebsd.org/~osa/:redis_module \
-                    https://github.com/downloads/masterzen/nginx-upload-progress-module:uploadprogress_module \
+                    https://github.com/masterzen/nginx-upload-progress-module/archive/:uploadprogress_module \
                     https://github.com/arut/nginx-dav-ext-module/archive/:davext_module \
                     https://github.com/arut/nginx-rtmp-module/archive/:rtmp_module \
                     https://github.com/slact/nginx_http_push_module/archive/:http_push_module \
@@ -34,8 +34,8 @@
 
 distfiles           ${name}-${version}${extract.suffix}:nginx
 checksums           ${name}-${version}${extract.suffix} \
-                    rmd160  58704be748781db2bcd67e5bad842f5ff8c55326 \
-                    sha256  b5608c2959d3e7ad09b20fc8f9e5bd4bc87b3bc8ba5936a513c04ed8f1391a18
+                    rmd160  4bd7b1c8a39eb366548a31073249b5bb4baac498 \
+                    sha256  d670006fbeca226d1dd18ad749d9fe6f8b18642f94de3377e0ac69a660e3ca9b
 
 depends_lib         port:pcre \
                     port:zlib
@@ -43,15 +43,17 @@
 patchfiles          patch-auto__install.diff \
                     patch-conf__nginx.conf.diff
 
+set nginx_share     ${prefix}/share/${name}
+set nginx_examples  ${nginx_share}/examples
 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
 set nginx_all_confs {fastcgi.conf fastcgi_params mime.types nginx.conf scgi_params uwsgi_params}
+set auto_activate_confs {nginx.conf mime.types fastcgi_params}
 
 # portfile-scoped vars for variant routines to re-def and use in port-stages (post-extract, pre-patch, etc)
 set nginx_upload_mod_dirname   ""
-set nginx_upload_progress_mod_dirname   ""
 
 # for aforementioned re-defs of portfile-scoped vars in variant routines
 proc nginx_set_portfile_var {var_name new_value} {
@@ -82,25 +84,38 @@
                     ${destroot}${nginx_rundir}
 
 post-destroot {
+    xinstall -d -m 755 ${destroot}${nginx_share}
+    xinstall -d -m 755 ${destroot}${nginx_examples}
+
     foreach conf ${nginx_all_confs} {
         set conf_path "${destroot}${nginx_confdir}/${conf}"
         if {[file exists ${conf_path}]} {
             file delete ${conf_path}
         }
+        if {[file exists ${conf_path}.default]} {
+            move ${conf_path}.default ${destroot}${nginx_examples}
+        }
     }
-    file mkdir ${destroot}${prefix}/share/nginx
-    file rename ${destroot}${prefix}/html ${destroot}${prefix}/share/nginx
+
+    file rename ${destroot}${prefix}/html ${destroot}${nginx_share}
 }
 
+post-activate {
+    foreach conf ${auto_activate_confs} {
+        if {![file exists ${nginx_confdir}/${conf}]} {
+            xinstall -m 644 ${nginx_examples}/${conf} ${nginx_confdir}/${conf}
+        }
+    }
+}
+
 startupitem.create      yes
 startupitem.pidfile     auto ${nginx_pidfile}
 startupitem.executable  ${prefix}/sbin/nginx
 
-notes                   \
-    "A sample nginx configuration file has been installed in
-    ${nginx_confdir}/nginx.conf.default.\nCopy the configuration to
-    ${nginx_confdir}/nginx.conf\nand adjust it to your needs before starting\
-    nginx."
+notes "\
+    A set of sample configuration files has been installed in ${nginx_examples}.\n\n\
+    Additionally, the files [join ${auto_activate_confs} ", "] have been copied to ${nginx_confdir} if they didn't exist yet.\n\
+    Adjust these files to your needs before starting nginx."
 
 variant addition description {Append text to pages} {
     configure.args-append   --with-http_addition_module
@@ -238,19 +253,13 @@
 
 variant upload_progress description {Enable Brice Figureau's upload progress module (https://github.com/masterzen/nginx-upload-progress-module)} {
     set uploadprg_filename  nginx_uploadprogress_module
-    set uploadprg_version   0.9.0
-    set uploadprg_distname  ${uploadprg_filename}-${uploadprg_version}
+    set uploadprg_version   0.9.1
+    set uploadprg_distname  v${uploadprg_version}
     distfiles-append        ${uploadprg_distname}.tar.gz:uploadprogress_module
     checksums-append        ${uploadprg_distname}.tar.gz \
-                            rmd160  10ff91748a06afd81abb9fdb203f164ea369463a \
-                            sha256  3fb903dab595cf6656fa0fc5743a48daffbba2f6b5c554836be630800eaad4e2
-    configure.args-append   --add-module=${workpath}/${uploadprg_distname}
-
-    nginx_set_portfile_var  nginx_upload_progress_mod_dirname "${uploadprg_distname}"
-    post-extract {
-        move [glob -directory ${workpath} masterzen-nginx-upload-progress-module*] \
-            "${workpath}/${nginx_upload_progress_mod_dirname}"
-    }
+                            rmd160  4810c8588d7fba9dc0130ec67ffe7e3ef27a2dd5 \
+                            sha256  99ec072cca35cd7791e77c40a8ded41a7a8c1111e057be26e55fba2fdf105f43
+    configure.args-append   --add-module=${workpath}/nginx-upload-progress-module-${uploadprg_version}
 }
 
 variant xslt description {Post-process pages with XSLT} {
@@ -272,35 +281,36 @@
 
 variant redis description {Enable Ngx HTTP Redis module} {
     set redis_filename      ngx_http_redis
-    set redis_version       0.3.6
+    set redis_version       0.3.7
     set redis_distname      ${redis_filename}-${redis_version}
     distfiles-append        ${redis_distname}.tar.gz:redis_module
     checksums-append        ${redis_distname}.tar.gz \
-                            rmd160  0d1de19ce1ae8b9b7fcd9693908403e613f5391d \
-                            sha256  9e5d8c0f1317a6910710c94d27f9aca4968c48ee1de271e5034525a1e9b6c70e
+                            rmd160  c63731371c547f67f4dd8a222ce0fad6ea67632f \
+                            sha256  9dfc14db81f431fdf3d69f3661a37daf110aef5f9479aa7c88cf362bb5d62604
     configure.args-append   --add-module=${workpath}/${redis_distname}
 }
 
 variant rtmp description {Enable Ngx RTMP module (https://github.com/arut/nginx-rtmp-module)} {
     set rtmp_filename       nginx-rtmp-module
-    set rtmp_version        1.1.4
+    # currently broken with 1.7.5
+    set rtmp_version        1.1.5
     set rtmp_distname       ${rtmp_filename}-${rtmp_version}
     distfiles-append        v${rtmp_version}.tar.gz:rtmp_module
     checksums-append        v${rtmp_version}.tar.gz \
-                            rmd160  c6338c64bab5c1c4aa10f908439fb1a5caa86ffc \
-                            sha256  076efef9698076fa23622e093cfb3959e4d14fcd6e9dcdf0b8e6d9154c720dc9
+                            rmd160  7ef95c413c86ffc84764cdc85c8c1a47182f866e \
+                            sha256  990467fed853b8eecd9b1b10050e2406071d705896be452539be8eced24adf4a
     configure.args-append   --add-module=${workpath}/${rtmp_distname}
 }
 
 variant http_push description {Enable Ngx HTTP Push module (https://github.com/slact/nginx_http_push_module)} {
-    set http_push_filename nginx_http_push_module
-    set http_push_version  0.712
-    set http_push_distname ${http_push_filename}-${http_push_version}
-    distfiles-append       v${http_push_version}.tar.gz:http_push_module
-    checksums-append       v${http_push_version}.tar.gz \
-                           rmd160  e51c174a0454e5bfb9234252dab73e71338ebdb9 \
-                           sha256  03eed6c4faf10d4c6226032c5f2632123c8333d9f95364a2a948a31677495719
-    configure.args-append  --add-module=${workpath}/${http_push_distname}
+    set http_push_filename  nginx_http_push_module
+    set http_push_version   0.73
+    set http_push_distname  ${http_push_filename}-${http_push_version}
+    distfiles-append        v${http_push_version}.tar.gz:http_push_module
+    checksums-append        v${http_push_version}.tar.gz \
+                            rmd160  4614b35edb7d1fe9e367d769f4c7e39589d3fae2 \
+                            sha256  a2a5b53a847493abef89c27360460997bea2b01d1394a7a612f1e13e4cfbb98a
+    configure.args-append   --add-module=${workpath}/${http_push_distname}
 }
 
 variant devel_kit description {Enable ngx_devel_kit module (https://github.com/simpl/ngx_devel_kit)} {
@@ -318,12 +328,13 @@
 variant lua requires devel_kit description {Enable Lua module (https://github.com/openresty/lua-nginx-module)} {
     depends_lib-append      port:luajit
     set ngx_lua_filename    lua-nginx-module
-    set ngx_lua_version     0.9.8
+    # currently broken with 1.7.5
+    set ngx_lua_version     0.9.12
     set ngx_lua_distname    ${ngx_lua_filename}-${ngx_lua_version}
     distfiles-append        v${ngx_lua_version}.tar.gz:lua_module
     checksums-append        v${ngx_lua_version}.tar.gz \
-                            rmd160  b2941977549bb345322e1ec00fca8916e56ea1e7 \
-                            sha256  b138ce7e2615f40e68c20dd248e26d88757a6206ca74f0fcdf10d6b06fe01514
+                            rmd160  5cbd0137e13efc9667069cd10856013a8c0155c9 \
+                            sha256  e85c1924ca4670d5708b58efcd6e77793c43f243317a9850a112964067f63150
 
     configure.cflags        -I${prefix}/include/luajit-2.0/ ${configure.cflags}
     configure.env           LUAJIT_INC=${prefix}/include/luajit-2.0/
@@ -333,4 +344,4 @@
 
 livecheck.type      regexm
 livecheck.url       ${homepage}
-livecheck.regex     {nginx-(\d+\.\d+\.\d+)</a>\s+stable}
+livecheck.regex     {nginx-(\d+\.\d+\.\d+)</a>\s+mainline}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140929/2b528a08/attachment.html>


More information about the macports-changes mailing list