[57854] trunk/dports/www/phpmyadmin/Portfile

alakazam at macports.org alakazam at macports.org
Thu Sep 17 08:36:15 PDT 2009


Revision: 57854
          http://trac.macports.org/changeset/57854
Author:   alakazam at macports.org
Date:     2009-09-17 08:36:12 -0700 (Thu, 17 Sep 2009)
Log Message:
-----------
Upgrade phpMyAdmin to 3.2.2 and correctly create a configuration file in ${prefix}/etc/ so that upgrading won't destroy previous configuration files. Closes tickets #21437 and #20769.

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

Modified: trunk/dports/www/phpmyadmin/Portfile
===================================================================
--- trunk/dports/www/phpmyadmin/Portfile	2009-09-17 15:30:17 UTC (rev 57853)
+++ trunk/dports/www/phpmyadmin/Portfile	2009-09-17 15:36:12 UTC (rev 57854)
@@ -4,7 +4,7 @@
 
 name                phpmyadmin
 set my_name         phpMyAdmin
-version             3.2.1
+version             3.2.2
 categories          www php databases
 maintainers         alakazam
 description         A tool written in PHP intended to handle the \
@@ -21,9 +21,9 @@
 distname            ${my_name}-${version}-all-languages
 use_bzip2           yes
 
-checksums           md5     f6b0273cba534fefa0a1d69b78a003df \
-                    sha1    3251e1a54d0e30e05bf4f9d4ede1c6ab063b2be3 \
-                    rmd160  c83f39bcccdd79417d63cd2b19c258b74174072e
+checksums           md5     a5f6492f89ee1ff17b76593af79640ce \
+                    sha1    271af738ac2798540fc395745c3a6fe5d5fc9f4e \
+                    rmd160  a08f00ec98bd1004ce4c5eb22c78a5e15ba838bb
 
 platforms           darwin freebsd
 
@@ -33,15 +33,28 @@
                     port:php5-mysql \
                     port:php5-zip
 
-set docpath ${destroot}${prefix}/www
+set docroot         ${destroot}${prefix}/www/${name}
+set configfile      ${prefix}/etc/${name}.inc.php
 
 use_configure       no
 build               {}
 
 destroot {
-    xinstall -d -m 0755 ${docpath}/phpmyadmin
-    eval copy [glob ${worksrcpath}/*] ${docpath}/phpmyadmin
+    xinstall -d -m 0755 ${docroot}
+    eval copy [glob ${worksrcpath}/*] ${docroot}
+    
+    ln -s ${configfile} ${docroot}/config.inc.php
+    
+    if {![file exists ${configfile}]} {
+        xinstall -m 644 ${worksrcpath}/config.sample.inc.php ${configfile}
+        
+        ui_msg "A new configuration file has been created at ${configfile}."
+        ui_msg "Please refer to the ${my_name} documentation when editing this file,"
+        ui_msg "an online version of which can be found at ${homepage}documentation/Documentation.html#config"
+        ui_msg ""
+    }
 }
 
-livecheck.distname  ${my_name}
-livecheck.regex     "<title>${livecheck.distname} (\\d+(?:\\.\\d+)*) .*</title>"
+livecheck.type      regex
+livecheck.url       ${homepage}
+livecheck.regex     "Download (\\d+(?:\\.\\d+)*)"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090917/d5786591/attachment.html>


More information about the macports-changes mailing list