2010-08-24 22:17:02 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
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
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Pgtap < Formula
|
2010-08-24 22:17:02 +00:00
|
|
|
url 'http://pgfoundry.org/frs/download.php/2701/pgtap-0.24.tar.bz2'
|
|
|
|
homepage 'http://pgtap.org'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '8a23fe62e1e476731076a588cb628fe9f1a028b1'
|
2010-08-24 22:17:02 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
depends_on PostgresqlInstalled.new
|
2010-11-04 03:04:42 +00:00
|
|
|
|
2012-03-10 17:34:06 +00:00
|
|
|
skip_clean :all
|
|
|
|
|
2010-08-24 22:17:02 +00:00
|
|
|
def install
|
|
|
|
system "make install"
|
|
|
|
bin.install %w(bbin/pg_prove bbin/pg_tapgen)
|
|
|
|
end
|
|
|
|
end
|