class Clamav < Formula desc "Anti-virus software" homepage "https://www.clamav.net/" url "https://www.clamav.net/downloads/production/clamav-0.101.2.tar.gz" sha256 "0a12ebdf6ff7a74c0bde2bdc2b55cae33449e6dd953ec90824a9e01291277634" bottle do sha256 "1056117fca7f6f1c1e1bee530ba8b8e54791a96dddf6472836d2e6af31554d3e" => :mojave sha256 "09c5da032cd80c38a7041d4a6372f37f7b0136cdd93116cac1ab0438ae4d5b93" => :high_sierra sha256 "a30c568e36a1a74c31c85bc7b37909734e10d5089f4ffe6aa3821b0b712b94a1" => :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