class Clamav < Formula desc "Anti-virus software" homepage "https://www.clamav.net/" url "https://www.clamav.net/downloads/production/clamav-0.101.4.tar.gz" sha256 "0bf094f0919d158a578421d66bc2569c8c8181233ba162bb51722f98c802bccd" bottle do sha256 "f64dacdcdd643b5b0b1d1cd3ed65da7da2234c8166832d6824732ec8f82ec05a" => :mojave sha256 "03d75f551dd0f8e8294813c8e4d9f8788f91442136b4b161a4fdd8a64bd95824" => :high_sierra sha256 "476100c9a34665b941e0f9c5e716394e8bc975a2298cc98fbf903a89ed6c8fd4" => :sierra end head do url "https://github.com/Cisco-Talos/clamav-devel.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "pkg-config" => :build depends_on "json-c" depends_on "openssl" depends_on "pcre" depends_on "yara" skip_clean "share/clamav" def install args = %W[ --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --libdir=#{lib} --sysconfdir=#{etc}/clamav --disable-zlib-vcheck --enable-llvm=no --with-libjson=#{Formula["json-c"].opt_prefix} --with-openssl=#{Formula["openssl"].opt_prefix} --with-pcre=#{Formula["pcre"].opt_prefix} --with-zlib=#{MacOS.sdk_path_if_needed}/usr ] pkgshare.mkpath system "autoreconf", "-fvi" if build.head? system "./configure", *args system "make", "install" end def caveats; <<~EOS To finish installation & run clamav you will need to edit the example conf files at #{etc}/clamav/ EOS end test do system "#{bin}/clamav-config", "--version" end end