From 7857a56154a58826ed658ce2b6c29bfc5c2ac70f Mon Sep 17 00:00:00 2001 From: Allen Huang Date: Fri, 28 Sep 2012 18:17:46 +0800 Subject: [PATCH] slony 2.1.2 Closes Homebrew/homebrew#15285. Closes Homebrew/homebrew#15201. Signed-off-by: Adam Vandenberg --- Formula/slony.rb | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Formula/slony.rb diff --git a/Formula/slony.rb b/Formula/slony.rb new file mode 100644 index 00000000000..f4d076be132 --- /dev/null +++ b/Formula/slony.rb @@ -0,0 +1,38 @@ +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 Slony < Formula + homepage 'http://slony.info/' + url 'http://slony.info/downloads/2.1/source/slony1-2.1.2.tar.bz2' + sha1 '47449fbc742a25eefdab088ab650973416bccb53' + + depends_on PostgresqlInstalled.new + + def install + system "./configure", "--disable-debug", + "--prefix=#{prefix}" + system "make install" + end + + def test + system "slon", "-v" + end +end