require 'formula' class Squid < Formula homepage 'http://www.squid-cache.org/' url 'http://www.squid-cache.org/Versions/v3/3.4/squid-3.4.6.tar.bz2' sha1 '0b8850a0bf73d85797e441e589324da8309cd738' 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 ] 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