2011-07-21 09:56:21 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
class PostgresqlInstalled < Requirement
|
|
|
|
def message; <<-EOS.undent
|
2012-10-07 01:02:43 +00:00
|
|
|
PostgreSQL is required to install.
|
2012-03-01 04:36:21 +00:00
|
|
|
|
|
|
|
You can install this with:
|
|
|
|
brew install postgresql
|
|
|
|
|
|
|
|
Or you can use an official installer from:
|
|
|
|
http://www.postgresql.org/
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
def satisfied?
|
2012-06-12 04:49:04 +00:00
|
|
|
which 'postgres'
|
2012-03-01 04:36:21 +00:00
|
|
|
end
|
|
|
|
def fatal?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-07-21 09:56:21 +00:00
|
|
|
class Skytools < Formula
|
|
|
|
homepage 'http://pgfoundry.org/projects/skytools/'
|
2012-07-29 22:28:01 +00:00
|
|
|
url 'http://pgfoundry.org/frs/download.php/3321/skytools-3.1.tar.gz'
|
|
|
|
sha1 'f31fb7096f160fb959f8a217cbea529da04b277e'
|
2011-07-21 09:56:21 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
depends_on PostgresqlInstalled.new
|
2011-07-21 09:56:21 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
def install
|
2011-07-21 09:56:21 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|