homebrew-core/Formula/clamav.rb
2019-01-10 16:32:49 +01:00

60 lines
1.6 KiB
Ruby

class Clamav < Formula
desc "Anti-virus software"
homepage "https://www.clamav.net/"
url "https://www.clamav.net/downloads/production/clamav-0.100.2.tar.gz"
sha256 "4a2e4f0cd41e62adb5a713b4a1857c49145cd09a69957e6d946ecad575206dd6"
revision 1
bottle do
sha256 "7005fda00690d3201019fdd68e69223e3b3213ebc10674508b4277a5d7d261a9" => :high_sierra
sha256 "c19f80b6a8fd410fff792bd6e059594672c559dc713e761184b6c07fa354e71a" => :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}
]
args << "--with-zlib=#{MacOS.sdk_path}/usr" unless MacOS::CLT.installed?
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