class Squid < Formula desc "Advanced proxy caching server for HTTP, HTTPS, FTP, and Gopher" homepage "http://www.squid-cache.org/" url "http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.4.tar.xz" sha256 "dce615d08e349caf3975fc5d51ce4c3c69b9995fb83f51dc5d55ae873d8bf6a4" bottle do sha256 "db246b52297badab3b482ff6525300e81633d5ff547f25a1c02a0dc3330648eb" => :yosemite sha256 "6e271226f1f30ac69e2dd05e95730dcdd62768c4511b6c6dd88d14e1fd4abdf7" => :mavericks sha256 "ec37c74bc79b7847cdf1f78a07fbcebcb371577fb962c4dfad862549145f1182" => :mountain_lion end depends_on "openssl" def install # http://stackoverflow.com/questions/20910109/building-squid-cache-on-os-x-mavericks ENV.append "LDFLAGS", "-lresolv" # For --disable-eui, see: # http://squid-web-proxy-cache.1019090.n4.nabble.com/ERROR-ARP-MAC-EUI-operations-not-supported-on-this-operating-system-td4659335.html args = %W[ --disable-debug --disable-dependency-tracking --prefix=#{prefix} --localstatedir=#{var} --enable-ssl --enable-ssl-crtd --disable-eui --enable-pf-transparent --with-included-ltdl --with-openssl ] system "./configure", *args system "make", "install" end def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_sbin}/squid -N -d 1 RunAtLoad WorkingDirectory #{var} EOS end end