aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/pgtap.rb
blob: 488d72de50219437f1f2c1c1737c2b7969f1ba96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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?
    Formula.factory('postgresql').installed?
  end
  def fatal?
    true
  end
end

class Pgtap < Formula
  homepage 'http://pgtap.org'
  url 'http://api.pgxn.org/dist/pgtap/0.91.0/pgtap-0.91.0.zip'
  sha1 '1f10b78eb42361659603228c754a55755fcff4fa'

  depends_on PostgresqlInstalled.new

  skip_clean 'share'

  def install
    ENV.prepend 'PATH', Formula.factory('postgresql').bin, ':'
    system "make install"
  end
end