[33697] trunk/dports/databases/mysql5-devel/Portfile

ryandesign at macports.org ryandesign at macports.org
Sun Feb 3 08:41:00 PST 2008


Revision: 33697
          http://trac.macosforge.org/projects/macports/changeset/33697
Author:   ryandesign at macports.org
Date:     2008-02-03 08:40:51 -0800 (Sun, 03 Feb 2008)

Log Message:
-----------
mysql5-devel: install files in the same places as mysql5; see #14142

Modified Paths:
--------------
    trunk/dports/databases/mysql5-devel/Portfile

Modified: trunk/dports/databases/mysql5-devel/Portfile
===================================================================
--- trunk/dports/databases/mysql5-devel/Portfile	2008-02-03 16:39:29 UTC (rev 33696)
+++ trunk/dports/databases/mysql5-devel/Portfile	2008-02-03 16:40:51 UTC (rev 33697)
@@ -5,6 +5,7 @@
 name                    mysql5-devel
 set vers                5.1.22
 version                 ${vers}-rc
+revision                1
 homepage                http://www.mysql.com/
 categories              databases
 platforms               darwin
@@ -40,24 +41,23 @@
 #set major_version       [strsed ${version} {s/\..*$//}]
 set major_version       [strsed ${vers} {s/\..*$//}]
 set mysql               mysql${major_version}
-#set dbdir               ${prefix}/var/db/${mysql}
-set sysconfdir          ${prefix}/etc/${name}
-set dbdir               ${prefix}/var/db/${name}
+set dbdir               ${prefix}/var/db/${mysql}
+set sysconfdir          ${prefix}/etc/${mysql}
 set mysqluser           mysql
 
 configure.args \
     --mandir=${prefix}/share/man \
     --infodir=${prefix}/share/info \
     --localstatedir=${dbdir} \
-    --libdir=${prefix}/lib/${name} \
-    --bindir=${prefix}/lib/${name}/bin \
-    --includedir=${prefix}/include/${name} \
-    --datadir=${prefix}/share/${name} \
+    --libdir=${prefix}/lib/${mysql} \
+    --bindir=${prefix}/lib/${mysql}/bin \
+    --includedir=${prefix}/include/${mysql} \
+    --datadir=${prefix}/share/${mysql} \
     --sysconfdir=${sysconfdir} \
     --with-zlib-dir=${prefix} \
     --with-ssl=${prefix} \
     --with-extra-charsets=complex \
-    --with-unix-socket-path=${prefix}/var/run/${name}/mysqld.sock \
+    --with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock \
     --with-mysqld-user=${mysqluser} \
     --without-docs \
     --without-bench \
@@ -85,8 +85,8 @@
     configure.args-delete --without-server
     # Create a startupitem to start/stop the server
     startupitem.create  yes
-    startupitem.start   "${prefix}/share/${name}/mysql/mysql.server start"
-    startupitem.stop    "${prefix}/share/${name}/mysql/mysql.server stop"
+    startupitem.start   "${prefix}/share/${mysql}/mysql/mysql.server start"
+    startupitem.stop    "${prefix}/share/${mysql}/mysql/mysql.server stop"
 }
 
 # the directories ${prefix}/sql-bench ${prefix}/mysql-test
@@ -94,8 +94,8 @@
 
 pre-destroot {
     # Some directories we must have in all cases
-    xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
-    destroot.keepdirs-append ${destroot}${prefix}/etc/${name}
+    xinstall -m 755 -d ${destroot}${sysconfdir}
+    destroot.keepdirs-append ${destroot}${sysconfdir}
     
     # Setup only for server
     if { [variant_isset server] } {
@@ -108,10 +108,10 @@
         
         xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
             ${destroot}${dbdir} \
-            ${destroot}${prefix}/var/run/${name}
+            ${destroot}${prefix}/var/run/${mysql}
         destroot.keepdirs-append  \
             ${destroot}${dbdir} \
-            ${destroot}${prefix}/var/run/${name}
+            ${destroot}${prefix}/var/run/${mysql}
     }
 }
 
@@ -122,13 +122,13 @@
     foreach manpage [glob -type f ${destroot}${prefix}/share/man/man\[1-9\]/*] {
         reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${manpage}
     }
-    foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${name}/mysql/my-*.cnf] {
+    foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${mysql}/mysql/my-*.cnf] {
         reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile}
     }
     
-    # Symlink mysql binaries into bin directory
-    foreach f [glob -tails -directory ${destroot}${prefix}/lib/${name}/bin my*] {
-        ln -sf ${prefix}/lib/${name}/bin/${f} ${destroot}${prefix}/bin/${f}${major_version}
+    # Symlink mysql binaries into bin directory, with ${major_version} appended to the name
+    foreach f [glob -tails -directory ${destroot}${prefix}/lib/${mysql}/bin my*] {
+        ln -sf ../lib/${mysql}/bin/${f} ${destroot}${prefix}/bin/${f}${major_version}
     }
 }
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080203/f4372f6d/attachment.html


More information about the macports-changes mailing list