2011-04-16 20:48:28 +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-04-16 20:48:28 +00:00
|
|
|
class PgTop < Formula
|
|
|
|
homepage 'http://ptop.projects.postgresql.org/'
|
2012-03-03 23:50:27 +00:00
|
|
|
url 'http://pgfoundry.org/frs/download.php/1781/pg_top-3.6.2.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'c165a5b09ab961bf98892db94b307e31ac0cf832'
|
2011-04-16 20:48:28 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
depends_on PostgresqlInstalled.new
|
2011-04-16 20:48:28 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
def install
|
2011-04-16 20:48:28 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|