aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mysql.rb
diff options
context:
space:
mode:
authorTom von Schwerdtner2009-09-30 23:56:05 -0400
committerMax Howell2009-10-01 15:17:31 +0100
commita0a850df1bf85f376f795af4dcf4b8926308524f (patch)
treee315c3a4dbec008e625d41389c05e6d9887be00e /Library/Formula/mysql.rb
parent84120895a9d692b5f81cfb592995ce0b89a2104b (diff)
downloadhomebrew-a0a850df1bf85f376f795af4dcf4b8926308524f.tar.bz2
Use HOMEBREW_PREFIX/var by default for the mysql db
* Switch to the tar.gz for download, it's a few MB smaller than the zip * Remove duplicate --with-plugins line * Switch statedir to #{HOMEBREW_PREFIX}/var/mysql * Set plist to treat HOMEBREW_PREFIX as home instead of hardcoding /usr/local Signed-off-by: Max Howell <max@methylblue.com> Closes #67 I amended the caveats slightly.
Diffstat (limited to 'Library/Formula/mysql.rb')
-rw-r--r--Library/Formula/mysql.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb
index 111078cce..b05092ecf 100644
--- a/Library/Formula/mysql.rb
+++ b/Library/Formula/mysql.rb
@@ -1,9 +1,9 @@
require 'brewkit'
class Mysql <Formula
- @url='http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.39.zip'
@homepage='http://dev.mysql.com/doc/refman/5.1/en/'
- @md5='93972105209abdc72c450c0c60f0e404'
+ @url='http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.39.tar.gz'
+ @md5='55a398daeb69a778fc46573623143268'
depends_on 'readline'
@@ -28,10 +28,9 @@ class Mysql <Formula
"--without-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
- "--localstatedir=#{var}",
+ "--localstatedir=#{HOMEBREW_PREFIX}/var/mysql",
"--with-plugins=innobase,myisam",
"--with-extra-charsets=complex",
- "--with-plugins=innobase,myisam",
"--with-ssl",
"--enable-assembler",
"--enable-thread-safe-client",
@@ -48,17 +47,19 @@ class Mysql <Formula
# save 66MB!
(prefix+'mysql-test').rmtree unless ARGV.include? '--with-tests'
- var.mkpath
-
(prefix+'com.mysql.mysqld.plist').write startup_plist
end
- def caveats
- puts "Set up databases with `mysql_install_db`"
- puts "Automatically load on login with "
- puts " `launchctl load -w #{prefix}/com.mysql.mysqld.plist`"
- puts "Or start manually with "
- puts " `#{prefix}/share/mysql/mysql.server start`"
+ def caveats; <<-EOS
+Set up databases with:
+ mysql_install_db
+
+Automatically load on login with:
+ launchctl load -w #{prefix}/com.mysql.mysqld.plist
+
+Or start manually with:
+ #{prefix}/share/mysql/mysql.server start
+ EOS
end
def startup_plist
@@ -78,7 +79,7 @@ class Mysql <Formula
<key>UserName</key>
<string>#{`whoami`}</string>
<key>WorkingDirectory</key>
- <string>/usr/local</string>
+ <string>#{HOMEBREW_PREFIX}</string>
</dict>
</plist>
EOPLIST