2011-12-07 19:38:42 +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-12-07 19:38:42 +00:00
|
|
|
class Mydumper < Formula
|
|
|
|
homepage 'http://www.mydumper.org/'
|
2012-02-22 05:12:27 +00:00
|
|
|
url 'http://launchpadlibrarian.net/77098505/mydumper-0.5.1.tar.gz'
|
2011-12-07 19:38:42 +00:00
|
|
|
md5 'b4df42dfe23f308ab13eb6ecb73a0d21'
|
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
depends_on MySqlInstalled.new
|
2012-02-08 17:35:08 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2011-12-07 19:38:42 +00:00
|
|
|
depends_on 'cmake' => :build
|
|
|
|
depends_on 'glib'
|
|
|
|
depends_on 'pcre'
|
|
|
|
|
|
|
|
def install
|
2012-02-22 05:12:27 +00:00
|
|
|
system "cmake #{std_cmake_parameters} ."
|
2011-12-07 19:38:42 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/mydumper --version"
|
|
|
|
end
|
|
|
|
end
|