Ticket #12313: mysql5-client.diff
File mysql5-client.diff, 4.5 KB (added by ryandesign (Ryan Carsten Schmidt), 17 years ago) |
---|
-
Portfile
2 2 3 3 PortSystem 1.0 4 4 5 name mysql5 5 name mysql5-client 6 6 version 5.0.45 7 7 homepage http://www.mysql.com/ 8 8 categories databases … … 11 11 distname mysql-${version} 12 12 13 13 description \ 14 Multithreaded SQL database server14 The world's most popular open-source database 15 15 16 16 long_description \ 17 MySQL is an open-source, multi-threaded SQL database \ 18 with a command syntax very similar to mSQL. 17 MySQL is the world's most popular open-source database. This port \ 18 installs the client libraries and binaries for connecting to an \ 19 existing MySQL server. If you want to run your own server, see \ 20 mysql5-server. 19 21 20 22 master_sites \ 21 23 http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/ \ … … 38 40 patchfiles \ 39 41 patch-mysys-base64.c.diff 40 42 41 set dbdir ${prefix}/var/db/${name} 43 set major_version 5 44 set mysql mysql${major_version} 45 set dbdir ${prefix}/var/db/${mysql} 42 46 set mysqluser mysql 43 47 48 dist_subdir ${mysql} 49 44 50 configure.args \ 45 51 --mandir=${prefix}/share/man \ 46 52 --infodir=${prefix}/share/info \ 47 53 --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} \54 --libdir=${prefix}/lib/${mysql} \ 55 --bindir=${prefix}/lib/${mysql}/bin \ 56 --includedir=${prefix}/include/${mysql} \ 57 --datadir=${prefix}/share/${mysql} \ 58 --sysconfdir=${prefix}/etc/${mysql} \ 53 59 --with-zlib-dir=${prefix} \ 54 60 --with-openssl=${prefix} \ 55 61 --with-extra-charsets=complex \ 56 --with-unix-socket-path=${prefix}/var/run/${ name}/mysqld.sock \62 --with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock \ 57 63 --with-mysqld-user=${mysqluser} \ 58 64 --without-bench \ 59 65 --enable-thread-safe-client … … 62 68 configure.compiler gcc-4.0 63 69 } 64 70 65 variant server {66 # Create a startupitem to start/stop the server67 startupitem.create yes68 startupitem.start "${prefix}/share/mysql5/mysql/mysql.server start"69 startupitem.stop "${prefix}/share/mysql5/mysql/mysql.server stop"70 }71 72 71 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 } 72 xinstall -m 755 -d ${destroot}${prefix}/etc/${mysql} 73 destroot.keepdirs-append ${destroot}${prefix}/etc/${mysql} 93 74 } 94 75 95 76 post-destroot { 96 77 delete ${destroot}${prefix}/mysql-test 97 78 98 # Symlink mysql binaries into bin directory, with a 5appended to the name79 # Symlink mysql binaries into bin directory, with ${major_version} appended to the name 99 80 cd ${destroot}${prefix}/bin 100 foreach f [glob -tails -directory ${destroot}${prefix}/lib/${ name}/bin my*] {101 ln -sf ../lib/${ name}/bin/${f} ${f}581 foreach f [glob -tails -directory ${destroot}${prefix}/lib/${mysql}/bin my*] { 82 ln -sf ../lib/${mysql}/bin/${f} ${f}${major_version} 102 83 } 103 84 } 104 85 105 86 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 } 87 ui_msg "****************************************************************" 88 ui_msg "${name} installs only the client libraries to connect to" 89 ui_msg "an existing MySQL server. If you want to run a MySQL server of" 90 ui_msg "your own on this machine, you should also install ${mysql}-server." 91 ui_msg "****************************************************************" 113 92 } 114 93 115 94 livecheck.check regex 116 95 livecheck.url http://dev.mysql.com/ 117 livecheck.regex "Generally Available ( \[0-9\.\]+)"96 livecheck.regex "Generally Available (${major_version}\\.\[0-9.\]+)"