homebrew-core/Formula/pgpool-ii.rb
Jack Nagel e433ffcf53 pgpool-ii: use a Requirement for Postgres
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:55 -05:00

33 lines
709 B
Ruby

require 'formula'
class PostgresqlInstalled < Requirement
def message; <<-EOS.undent
PostgresQL is required to install.
You can install this with:
brew install postgresql
Or you can use an official installer from:
http://www.postgresql.org/
EOS
end
def satisfied?
which 'pg_config'
end
def fatal?
true
end
end
class PgpoolIi < Formula
homepage 'http://pgpool.projects.postgresql.org/'
url 'http://pgfoundry.org/frs/download.php/2841/pgpool-II-3.0.1.tar.gz'
md5 '86d8beff0396d11b6753dd2be31bcad7'
depends_on PostgresqlInstalled.new
def install
system "./configure", "--prefix=#{prefix}", "--mandir=#{man}"
system "make install"
end
end