aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/squid.rb
blob: d65d83a9c336963bfcfa74a2224f4db8d9dfdc1b (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
require 'formula'

class NoBdb5 < Requirement
  def message; <<-EOS.undent
    This software can fail to compile when Berkeley-DB 5.x is installed.
    You may need to try:
      brew unlink berkeley-db
      brew install dsniff
      brew link berkeley-db
    EOS
  end
  def satisfied?
    f = Formula.factory("berkeley-db")
    not f.installed?
  end
end

class Squid < Formula
  url 'http://www.squid-cache.org/Versions/v3/3.1/squid-3.1.9.tar.bz2'
  homepage 'http://www.squid-cache.org/'
  md5 '896ace723445ac168986ba8854437ce3'

  depends_on NoBdb5.new

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--localstatedir=#{var}"
    system "make install"
  end
end