[28858] trunk/dports/databases/mysql5/Portfile
source_changes at macosforge.org
source_changes at macosforge.org
Mon Sep 10 02:25:57 PDT 2007
Revision: 28858
http://trac.macosforge.org/projects/macports/changeset/28858
Author: ryandesign at macports.org
Date: 2007-09-10 02:25:56 -0700 (Mon, 10 Sep 2007)
Log Message:
-----------
mysql5: abstract out the port name, in preparation for (hopefully) splitting the server portion into its own port; see #12313
Modified Paths:
--------------
trunk/dports/databases/mysql5/Portfile
Modified: trunk/dports/databases/mysql5/Portfile
===================================================================
--- trunk/dports/databases/mysql5/Portfile 2007-09-10 09:21:08 UTC (rev 28857)
+++ trunk/dports/databases/mysql5/Portfile 2007-09-10 09:25:56 UTC (rev 28858)
@@ -39,24 +39,26 @@
patchfiles \
patch-mysys-base64.c.diff
-set dbdir ${prefix}/var/db/${name}
-set sysconfdir ${prefix}/etc/${name}
+set major_version [strsed ${version} {s/\..*$//}]
+set mysql mysql${major_version}
+set dbdir ${prefix}/var/db/${mysql}
+set sysconfdir ${prefix}/etc/${mysql}
set mysqluser mysql
configure.args \
--mandir=${prefix}/share/man \
--infodir=${prefix}/share/info \
--localstatedir=${dbdir} \
- --libdir=${prefix}/lib/${name} \
- --bindir=${prefix}/lib/${name}/bin \
- --includedir=${prefix}/include/${name} \
- --datadir=${prefix}/share/${name} \
+ --libdir=${prefix}/lib/${mysql} \
+ --bindir=${prefix}/lib/${mysql}/bin \
+ --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/${name}/mysqld.sock \
+ --with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock \
--with-mysqld-user=${mysqluser} \
--without-bench \
--enable-thread-safe-client
@@ -68,14 +70,14 @@
variant server {
# Create a startupitem to start/stop the server
startupitem.create yes
- startupitem.start "${prefix}/share/mysql5/mysql/mysql.server start"
- startupitem.stop "${prefix}/share/mysql5/mysql/mysql.server stop"
+ 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}${prefix}/etc/${name}
- destroot.keepdirs-append ${destroot}${prefix}/etc/${name}
+ xinstall -m 755 -d ${destroot}${sysconfdir}
+ destroot.keepdirs-append ${destroot}${sysconfdir}
# Setup only for server
if { [variant_isset server] } {
@@ -88,10 +90,10 @@
xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
${destroot}${dbdir} \
- ${destroot}${prefix}/var/run/${name}
+ ${destroot}${prefix}/var/run/${mysql}
destroot.keepdirs-append \
${destroot}${dbdir} \
- ${destroot}${prefix}/var/run/${name}
+ ${destroot}${prefix}/var/run/${mysql}
}
}
@@ -102,14 +104,14 @@
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/${name}/mysql/my-*.cnf] {
+ 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 a 5 appended to the name
+ # Symlink mysql binaries into bin directory, with ${major_version} appended to the name
cd ${destroot}${prefix}/bin
- foreach f [glob -tails -directory ${destroot}${prefix}/lib/${name}/bin my*] {
- ln -sf ../lib/${name}/bin/${f} ${f}5
+ foreach f [glob -tails -directory ${destroot}${prefix}/lib/${mysql}/bin my*] {
+ ln -sf ../lib/${mysql}/bin/${f} ${f}${major_version}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070910/787748dc/attachment.html
More information about the macports-changes
mailing list