homebrew-core/Formula/mysql-proxy.rb
2012-03-06 06:53:07 -08:00

32 lines
1.1 KiB
Ruby

require 'formula'
class MysqlProxy < Formula
url 'http://launchpad.net/mysql-proxy/0.8/0.8.0/+download/mysql-proxy-0.8.0.tar.gz'
homepage 'https://launchpad.net/mysql-proxy'
md5 'b6a9748d72e8db7fe3789fbdd60ff451'
depends_on 'pkg-config' => :build
depends_on 'glib'
depends_on 'libevent'
depends_on 'lua'
def install
unless which 'mysql_config'
opoo "`mysql_config` was not found"
puts "This software requires the MySQL client libraries."
puts "You can install them via Homebrew with one of these:"
puts " brew install mysql-connector-c"
puts " brew install mysql [--client-only]"
puts "Without the client libraries, this formula will fail to compile."
end
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
# Ugh, don't dump these directly into /usr/local/include.
# Use a subfolder, please.
"--includedir=#{include}/mysqlproxy"
system "make install"
# Copy over the example scripts
(share+"mysqlproxy").install Dir['examples/*.lua']
end
end