[50615] trunk/dports/databases

ryandesign at macports.org ryandesign at macports.org
Mon May 4 20:57:58 PDT 2009


Revision: 50615
          http://trac.macports.org/changeset/50615
Author:   ryandesign at macports.org
Date:     2009-05-04 20:57:54 -0700 (Mon, 04 May 2009)
Log Message:
-----------
mysql5-server: New port to contain just the startup scripts for mysql5; see #12313.

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

Added Paths:
-----------
    trunk/dports/databases/mysql5-server/

Modified: trunk/dports/databases/mysql5-server/Portfile
===================================================================
--- trunk/dports/databases/mysql5/Portfile	2009-05-05 02:53:29 UTC (rev 50614)
+++ trunk/dports/databases/mysql5-server/Portfile	2009-05-05 03:57:54 UTC (rev 50615)
@@ -2,15 +2,14 @@
 
 PortSystem              1.0
 
-name                    mysql5
+name                    mysql5-server
 version                 5.0.81
 set branch              [join [lrange [split ${version} .] 0 1] .]
 homepage                http://www.mysql.com/
 categories              databases
 platforms               darwin
 maintainers             ryandesign
-distname                mysql-${version}
-use_parallel_build      yes
+distfiles
 
 description \
     Multithreaded SQL database server
@@ -19,24 +18,9 @@
     MySQL is an open-source, multi-threaded SQL database \
     with a command syntax very similar to mSQL.
 
-master_sites \
-    http://mysql.mirrors.pair.com/Downloads/MySQL-${branch}/ \
-    http://mysql.he.net/Downloads/MySQL-${branch}/ \
-    http://mysql.orst.edu/Downloads/MySQL-${branch} \
-    http://mysql.oss.eznetsols.org/Downloads/MySQL-${branch}/ \
-    http://mirrors.sunsite.dk/mysql/Downloads/MySQL-${branch}/ \
-    http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-${branch}/ \
-    http://ftp.plusline.de/mysql/Downloads/MySQL-${branch}/
+depends_run \
+    path:bin/mysql_config5:mysql5
 
-checksums \
-    md5     2d35e4980f279c839172a6efdb0f0b15 \
-    sha1    2aaaef8a08eeb0bbff46ca6c1b1f8d416ad5c18a \
-    rmd160  c0dfdc8144f721a4af5ed38200e7233868033695
-
-depends_lib \
-    port:zlib \
-    port:openssl
-
 set major_version       [strsed ${version} {s/\..*$//}]
 set mysql               mysql${major_version}
 set libdir              ${prefix}/lib/${mysql}
@@ -45,94 +29,37 @@
 set sysconfdir          ${prefix}/etc/${mysql}
 set mysqluser           mysql
 
-patchfiles \
-    patch-mysql_secure_installation.sh.diff
+startupitem.create      yes
+startupitem.start       "${prefix}/share/${mysql}/mysql/mysql.server start"
+startupitem.stop        "${prefix}/share/${mysql}/mysql/mysql.server stop"
 
-post-patch {
-    reinplace s%@BINDIR@%${bindir}%g ${worksrcpath}/scripts/mysql_secure_installation.sh
-}
+use_configure           no
 
-configure.args \
-    --mandir=${prefix}/share/man \
-    --infodir=${prefix}/share/info \
-    --localstatedir=${dbdir} \
-    --libdir=${libdir} \
-    --bindir=${bindir} \
-    --includedir=${prefix}/include/${mysql} \
-    --datadir=${prefix}/share/${mysql} \
-    --sysconfdir=${sysconfdir} \
-    --with-zlib-dir=${prefix} \
-    --with-openssl=${prefix} \
-    --with-extra-charsets=complex \
-    --with-federated-storage-engine \
-    --with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock \
-    --with-mysqld-user=${mysqluser} \
-    --without-bench \
-    --enable-thread-safe-client
+build {}
 
-# Add readline support.
-# "--without-readline" has the peculiar meaning "do not use the bundled copy
-# of readline but use the systems (i.e. MacPorts') copy of readline"
-depends_lib-append      port:readline
-configure.args-append   --without-readline
-
-variant server {
-    # Create a startupitem to start/stop the server
-    startupitem.create  yes
-    startupitem.start   "${prefix}/share/${mysql}/mysql/mysql.server start"
-    startupitem.stop    "${prefix}/share/${mysql}/mysql/mysql.server stop"
-}
-
-pre-destroot {
-    # Some directories we must have in all cases
-    xinstall -m 755 -d ${destroot}${sysconfdir}
-    destroot.keepdirs-append ${destroot}${sysconfdir}
+destroot {
+    addgroup ${mysqluser}
+    set gid [existsgroup ${mysqluser}]
+    adduser ${mysqluser} gid=${gid} realname=MySQL\ Server
     
-    # Setup only for server
-    if { [variant_isset server] } {
-        addgroup ${mysqluser}
-        set gid [existsgroup ${mysqluser}]
-        adduser ${mysqluser} gid=${gid} realname=MySQL\ Server
-        
-        # Some directories we must have only if we're running as a server
-        xinstall -m 755 -o root -d ${destroot}${prefix}/var/run
-        
-        xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
-            ${destroot}${dbdir} \
-            ${destroot}${prefix}/var/log/${mysql} \
-            ${destroot}${prefix}/var/run/${mysql}
-        destroot.keepdirs-append  \
-            ${destroot}${dbdir} \
-            ${destroot}${prefix}/var/log/${mysql} \
-            ${destroot}${prefix}/var/run/${mysql}
-    }
-}
-
-post-destroot {
-    delete ${destroot}${prefix}/mysql-test
+    xinstall -m 755 -o root -d ${destroot}${prefix}/var/run
     
-    # Fix paths in manpages and sample configuration files
-    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/${mysql}/mysql/my-*.cnf] {
-        reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile}
-    }
-    
-    # Symlink mysql binaries into bin directory, with ${major_version} appended to the name
-    foreach f [glob -tails -directory ${destroot}${bindir} my*] {
-        ln -sf ${bindir}/${f} ${destroot}${prefix}/bin/${f}${major_version}
-    }
+    xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
+        ${destroot}${dbdir} \
+        ${destroot}${prefix}/var/log/${mysql} \
+        ${destroot}${prefix}/var/run/${mysql}
+    destroot.keepdirs-append  \
+        ${destroot}${dbdir} \
+        ${destroot}${prefix}/var/log/${mysql} \
+        ${destroot}${prefix}/var/run/${mysql}
 }
 
 post-install {
-    if { [variant_isset server] } {
-        ui_msg "******************************************************"
-        ui_msg "* In order to setup the database, you might want to run"
-        ui_msg "* sudo -u ${mysqluser} mysql_install_db5"
-        ui_msg "* if this is a new install"
-        ui_msg "******************************************************"
-    }
+    ui_msg "******************************************************"
+    ui_msg "* In order to setup the database, you might want to run"
+    ui_msg "* sudo -u ${mysqluser} mysql_install_db5"
+    ui_msg "* if this is a new install"
+    ui_msg "******************************************************"
 }
 
 livecheck.check         regex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090504/b5a8ae86/attachment-0001.html>


More information about the macports-changes mailing list