Index: Portfile
===================================================================
--- Portfile	(revision 28490)
+++ Portfile	(working copy)
@@ -8,110 +8,15 @@
 categories          databases
 platforms           darwin
 maintainers         ryandesign
-distname            mysql-${version}
+distfiles
 
-description \
-	Multithreaded SQL database server
+description         See ports ${name}-client and ${name}-server
+long_description    ${description}
 
-long_description \
-	MySQL is an open-source, multi-threaded SQL database \
-	with a command syntax very similar to mSQL.
+depends_run         port:mysql5-client
 
-master_sites \
-	http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/ \
-	http://mysql.he.net/Downloads/MySQL-5.0/ \
-	http://mysql.orst.edu/Downloads/MySQL-5.0 \
-	http://mysql.oss.eznetsols.org/Downloads/MySQL-5.0/ \
-	http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0/ \
-	http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.0/ \
-	http://ftp.plusline.de/mysql/Downloads/MySQL-5.0/
-
-checksums \
-	md5 a2a1c5a82bb22b45ab76a8ecab94e10d \
-	sha1 a5fba8e004acc43ac1a576d728f10215f54ebe20 \
-	rmd160 ee6717c65dc7bb6b5b596b90ef6c47c7fdebf5fb
-
-depends_lib \
-	port:zlib \
-	port:openssl
-
-patchfiles \
-	patch-mysys-base64.c.diff
-
-set dbdir           ${prefix}/var/db/${name}
-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} \
-	--sysconfdir=${prefix}/etc/${name} \
-	--with-zlib-dir=${prefix} \
-	--with-openssl=${prefix} \
-	--with-extra-charsets=complex \
-	--with-unix-socket-path=${prefix}/var/run/${name}/mysqld.sock \
-	--with-mysqld-user=${mysqluser} \
-	--without-bench \
-	--enable-thread-safe-client
-
-platform darwin 8 {
-	configure.compiler	gcc-4.0
-}
-
 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"
+	depends_run-append port:mysql5-server
 }
 
-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}
-	
-	# Setup only for server
-	if { [variant_isset server] } {
-		addgroup ${mysqluser}
-		set gid [existsgroup ${mysqluser}]
-		adduser ${mysqluser} gid=${gid} realname=MySQL\ Server
-		
-		# Some directories we must have only if we're running as a server
-		xinstall -m 755 -o root -d ${destroot}${prefix}/var/run
-		
-		xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
-			${destroot}${dbdir} \
-			${destroot}${prefix}/var/run/${name}
-		destroot.keepdirs-append  \
-			${destroot}${dbdir} \
-			${destroot}${prefix}/var/run/${name}
-	}
-}
-
-post-destroot {
-	delete ${destroot}${prefix}/mysql-test
-	
-	# Symlink mysql binaries into bin directory, with a 5 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
-	}
-}
-
-post-install {
-	if { [variant_isset server] } {
-		ui_msg "******************************************************"
-		ui_msg "* In order to setup the database, you might want to run"
-		ui_msg "* sudo -u ${mysqluser} mysql_install_db5"
-		ui_msg "* if this is a new install" 
-		ui_msg "******************************************************"
-	}
-}
-
-livecheck.check     regex
-livecheck.url       http://dev.mysql.com/
-livecheck.regex     "Generally Available (\[0-9\.\]+)"
+livecheck.check     none

