Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Changeset 28858

Show
Ignore:
Timestamp:
2007-09-10 02:25:56 (15 months ago)
Author:
ryandesign@…
Message:

mysql5: abstract out the port name, in preparation for (hopefully) splitting the server portion into its own port; see #12313

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/dports/databases/mysql5/Portfile

    r28852 r28858  
    4040        patch-mysys-base64.c.diff 
    4141 
    42 set dbdir           ${prefix}/var/db/${name} 
    43 set sysconfdir      ${prefix}/etc/${name} 
     42set major_version   [strsed ${version} {s/\..*$//}] 
     43set mysql           mysql${major_version} 
     44set dbdir           ${prefix}/var/db/${mysql} 
     45set sysconfdir      ${prefix}/etc/${mysql} 
    4446set mysqluser       mysql 
    4547 
     
    4850        --infodir=${prefix}/share/info \ 
    4951        --localstatedir=${dbdir} \ 
    50         --libdir=${prefix}/lib/${name} \ 
    51         --bindir=${prefix}/lib/${name}/bin \ 
    52         --includedir=${prefix}/include/${name} \ 
    53         --datadir=${prefix}/share/${name} \ 
     52        --libdir=${prefix}/lib/${mysql} \ 
     53        --bindir=${prefix}/lib/${mysql}/bin \ 
     54        --includedir=${prefix}/include/${mysql} \ 
     55        --datadir=${prefix}/share/${mysql} \ 
    5456        --sysconfdir=${sysconfdir} \ 
    5557        --with-zlib-dir=${prefix} \ 
     
    5759        --with-extra-charsets=complex \ 
    5860        --with-federated-storage-engine \ 
    59         --with-unix-socket-path=${prefix}/var/run/${name}/mysqld.sock \ 
     61        --with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock \ 
    6062        --with-mysqld-user=${mysqluser} \ 
    6163        --without-bench \ 
     
    6971        # Create a startupitem to start/stop the server 
    7072        startupitem.create      yes 
    71         startupitem.start       "${prefix}/share/mysql5/mysql/mysql.server start" 
    72         startupitem.stop        "${prefix}/share/mysql5/mysql/mysql.server stop" 
     73        startupitem.start       "${prefix}/share/${mysql}/mysql/mysql.server start" 
     74        startupitem.stop        "${prefix}/share/${mysql}/mysql/mysql.server stop" 
    7375} 
    7476 
    7577pre-destroot { 
    7678        # Some directories we must have in all cases 
    77         xinstall -m 755 -d ${destroot}${prefix}/etc/${name} 
    78         destroot.keepdirs-append ${destroot}${prefix}/etc/${name} 
     79        xinstall -m 755 -d ${destroot}${sysconfdir} 
     80        destroot.keepdirs-append ${destroot}${sysconfdir} 
    7981         
    8082        # Setup only for server 
     
    8991                xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \ 
    9092                        ${destroot}${dbdir} \ 
    91                         ${destroot}${prefix}/var/run/${name} 
     93                        ${destroot}${prefix}/var/run/${mysql} 
    9294                destroot.keepdirs-append  \ 
    9395                        ${destroot}${dbdir} \ 
    94                         ${destroot}${prefix}/var/run/${name} 
     96                        ${destroot}${prefix}/var/run/${mysql} 
    9597        } 
    9698} 
     
    103105                reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${manpage} 
    104106        } 
    105         foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${name}/mysql/my-*.cnf] { 
     107        foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${mysql}/mysql/my-*.cnf] { 
    106108                reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile} 
    107109        } 
    108110         
    109         # Symlink mysql binaries into bin directory, with a 5 appended to the name 
     111        # Symlink mysql binaries into bin directory, with ${major_version} appended to the name 
    110112        cd ${destroot}${prefix}/bin 
    111         foreach f [glob -tails -directory ${destroot}${prefix}/lib/${name}/bin my*] { 
    112                 ln -sf ../lib/${name}/bin/${f} ${f}5 
     113        foreach f [glob -tails -directory ${destroot}${prefix}/lib/${mysql}/bin my*] { 
     114                ln -sf ../lib/${mysql}/bin/${f} ${f}${major_version} 
    113115        } 
    114116}