2010-07-07 21:53:11 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
class MySqlInstalled < Requirement
|
|
|
|
def message; <<-EOS.undent
|
|
|
|
MySQL is required to install.
|
|
|
|
|
|
|
|
You can install this with Homebrew using:
|
|
|
|
brew install mysql-connector-c
|
|
|
|
For MySQL client libraries only.
|
|
|
|
|
|
|
|
brew install mysql
|
|
|
|
For MySQL server.
|
|
|
|
|
|
|
|
Or you can use an official installer from:
|
|
|
|
http://dev.mysql.com/downloads/mysql/
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
def satisfied?
|
|
|
|
which 'mysql_config'
|
|
|
|
end
|
|
|
|
def fatal?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Dbslayer < Formula
|
2010-07-07 21:53:11 +00:00
|
|
|
homepage 'http://code.nytimes.com/projects/dbslayer/wiki'
|
2012-02-26 06:40:35 +00:00
|
|
|
url 'http://code.nytimes.com/downloads/dbslayer-beta-12.tgz'
|
2010-07-07 21:53:11 +00:00
|
|
|
version '0.12.b'
|
2012-02-26 06:40:35 +00:00
|
|
|
md5 'a529ea503c244d723166f78c75df3bb3'
|
2010-07-07 21:53:11 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
depends_on MySqlInstalled.new
|
2010-07-07 21:53:11 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
def install
|
2010-07-07 21:53:11 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|