Changeset 28858
- Timestamp:
- 2007-09-10 02:25:56 (15 months ago)
- Files:
-
- 1 modified
-
trunk/dports/databases/mysql5/Portfile (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/databases/mysql5/Portfile
r28852 r28858 40 40 patch-mysys-base64.c.diff 41 41 42 set dbdir ${prefix}/var/db/${name} 43 set sysconfdir ${prefix}/etc/${name} 42 set major_version [strsed ${version} {s/\..*$//}] 43 set mysql mysql${major_version} 44 set dbdir ${prefix}/var/db/${mysql} 45 set sysconfdir ${prefix}/etc/${mysql} 44 46 set mysqluser mysql 45 47 … … 48 50 --infodir=${prefix}/share/info \ 49 51 --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} \ 54 56 --sysconfdir=${sysconfdir} \ 55 57 --with-zlib-dir=${prefix} \ … … 57 59 --with-extra-charsets=complex \ 58 60 --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 \ 60 62 --with-mysqld-user=${mysqluser} \ 61 63 --without-bench \ … … 69 71 # Create a startupitem to start/stop the server 70 72 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" 73 75 } 74 76 75 77 pre-destroot { 76 78 # 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} 79 81 80 82 # Setup only for server … … 89 91 xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \ 90 92 ${destroot}${dbdir} \ 91 ${destroot}${prefix}/var/run/${ name}93 ${destroot}${prefix}/var/run/${mysql} 92 94 destroot.keepdirs-append \ 93 95 ${destroot}${dbdir} \ 94 ${destroot}${prefix}/var/run/${ name}96 ${destroot}${prefix}/var/run/${mysql} 95 97 } 96 98 } … … 103 105 reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${manpage} 104 106 } 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] { 106 108 reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile} 107 109 } 108 110 109 # Symlink mysql binaries into bin directory, with a 5appended to the name111 # Symlink mysql binaries into bin directory, with ${major_version} appended to the name 110 112 cd ${destroot}${prefix}/bin 111 foreach f [glob -tails -directory ${destroot}${prefix}/lib/${ name}/bin my*] {112 ln -sf ../lib/${ name}/bin/${f} ${f}5113 foreach f [glob -tails -directory ${destroot}${prefix}/lib/${mysql}/bin my*] { 114 ln -sf ../lib/${mysql}/bin/${f} ${f}${major_version} 113 115 } 114 116 }

