Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #12313: mysql5.diff

File mysql5.diff, 3.7 KB (added by ryandesign@…, 15 months ago)
  • Portfile

     
    88categories          databases 
    99platforms           darwin 
    1010maintainers         ryandesign 
    11 distname            mysql-${version} 
     11distfiles 
    1212 
    13 description \ 
    14         Multithreaded SQL database server 
     13description         See ports ${name}-client and ${name}-server 
     14long_description    ${description} 
    1515 
    16 long_description \ 
    17         MySQL is an open-source, multi-threaded SQL database \ 
    18         with a command syntax very similar to mSQL. 
     16depends_run         port:mysql5-client 
    1917 
    20 master_sites \ 
    21         http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/ \ 
    22         http://mysql.he.net/Downloads/MySQL-5.0/ \ 
    23         http://mysql.orst.edu/Downloads/MySQL-5.0 \ 
    24         http://mysql.oss.eznetsols.org/Downloads/MySQL-5.0/ \ 
    25         http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0/ \ 
    26         http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.0/ \ 
    27         http://ftp.plusline.de/mysql/Downloads/MySQL-5.0/ 
    28  
    29 checksums \ 
    30         md5 a2a1c5a82bb22b45ab76a8ecab94e10d \ 
    31         sha1 a5fba8e004acc43ac1a576d728f10215f54ebe20 \ 
    32         rmd160 ee6717c65dc7bb6b5b596b90ef6c47c7fdebf5fb 
    33  
    34 depends_lib \ 
    35         port:zlib \ 
    36         port:openssl 
    37  
    38 patchfiles \ 
    39         patch-mysys-base64.c.diff 
    40  
    41 set dbdir           ${prefix}/var/db/${name} 
    42 set mysqluser       mysql 
    43  
    44 configure.args \ 
    45         --mandir=${prefix}/share/man \ 
    46         --infodir=${prefix}/share/info \ 
    47         --localstatedir=${dbdir} \ 
    48         --libdir=${prefix}/lib/${name} \ 
    49         --bindir=${prefix}/lib/${name}/bin \ 
    50         --includedir=${prefix}/include/${name} \ 
    51         --datadir=${prefix}/share/${name} \ 
    52         --sysconfdir=${prefix}/etc/${name} \ 
    53         --with-zlib-dir=${prefix} \ 
    54         --with-openssl=${prefix} \ 
    55         --with-extra-charsets=complex \ 
    56         --with-unix-socket-path=${prefix}/var/run/${name}/mysqld.sock \ 
    57         --with-mysqld-user=${mysqluser} \ 
    58         --without-bench \ 
    59         --enable-thread-safe-client 
    60  
    61 platform darwin 8 { 
    62         configure.compiler      gcc-4.0 
    63 } 
    64  
    6518variant server { 
    66         # Create a startupitem to start/stop the server 
    67         startupitem.create      yes 
    68         startupitem.start       "${prefix}/share/mysql5/mysql/mysql.server start" 
    69         startupitem.stop        "${prefix}/share/mysql5/mysql/mysql.server stop" 
     19        depends_run-append port:mysql5-server 
    7020} 
    7121 
    72 pre-destroot { 
    73         # Some directories we must have in all cases 
    74         xinstall -m 755 -d ${destroot}${prefix}/etc/${name} 
    75         destroot.keepdirs-append ${destroot}${prefix}/etc/${name} 
    76          
    77         # Setup only for server 
    78         if { [variant_isset server] } { 
    79                 addgroup ${mysqluser} 
    80                 set gid [existsgroup ${mysqluser}] 
    81                 adduser ${mysqluser} gid=${gid} realname=MySQL\ Server 
    82                  
    83                 # Some directories we must have only if we're running as a server 
    84                 xinstall -m 755 -o root -d ${destroot}${prefix}/var/run 
    85                  
    86                 xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \ 
    87                         ${destroot}${dbdir} \ 
    88                         ${destroot}${prefix}/var/run/${name} 
    89                 destroot.keepdirs-append  \ 
    90                         ${destroot}${dbdir} \ 
    91                         ${destroot}${prefix}/var/run/${name} 
    92         } 
    93 } 
    94  
    95 post-destroot { 
    96         delete ${destroot}${prefix}/mysql-test 
    97          
    98         # Symlink mysql binaries into bin directory, with a 5 appended to the name 
    99         cd ${destroot}${prefix}/bin 
    100         foreach f [glob -tails -directory ${destroot}${prefix}/lib/${name}/bin my*] { 
    101                 ln -sf ../lib/${name}/bin/${f} ${f}5 
    102         } 
    103 } 
    104  
    105 post-install { 
    106         if { [variant_isset server] } { 
    107                 ui_msg "******************************************************" 
    108                 ui_msg "* In order to setup the database, you might want to run" 
    109                 ui_msg "* sudo -u ${mysqluser} mysql_install_db5" 
    110                 ui_msg "* if this is a new install"  
    111                 ui_msg "******************************************************" 
    112         } 
    113 } 
    114  
    115 livecheck.check     regex 
    116 livecheck.url       http://dev.mysql.com/ 
    117 livecheck.regex     "Generally Available (\[0-9\.\]+)" 
     22livecheck.check     none