2011-03-10 05:11:03 +00:00
|
|
|
class Clamav < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Anti-virus software"
|
2016-04-17 19:54:48 +00:00
|
|
|
homepage "https://www.clamav.net/"
|
2016-05-18 13:38:11 +00:00
|
|
|
url "https://www.clamav.net/downloads/production/clamav-0.99.2.tar.gz"
|
|
|
|
sha256 "167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a"
|
2016-06-18 02:28:18 +00:00
|
|
|
revision 1
|
2013-04-24 19:26:45 +00:00
|
|
|
|
2014-06-25 03:47:52 +00:00
|
|
|
bottle do
|
2016-06-18 02:41:30 +00:00
|
|
|
sha256 "0e8fa7cfafc6a8c2fefd2f0c2044d7ef6c7efa3839444609c326c4ed0cf5520f" => :el_capitan
|
|
|
|
sha256 "7f0d14eb642997a856796366e8ff6c1b17fb6076aa198d1255c6bf73c0862a33" => :yosemite
|
|
|
|
sha256 "6b82bf35cd1cc06cf6f736e69763397ed6225f71217c780ae91ebc30df8f1c70" => :mavericks
|
2014-06-25 03:47:52 +00:00
|
|
|
end
|
|
|
|
|
2014-11-23 19:04:34 +00:00
|
|
|
head do
|
|
|
|
url "https://github.com/vrtadmin/clamav-devel.git"
|
|
|
|
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
|
|
|
|
2015-12-12 20:59:51 +00:00
|
|
|
depends_on "pkg-config" => :build
|
2014-09-29 01:36:34 +00:00
|
|
|
depends_on "openssl"
|
2016-06-18 02:28:18 +00:00
|
|
|
depends_on "pcre" => :recommended
|
2015-12-12 20:59:51 +00:00
|
|
|
depends_on "yara" => :optional
|
2014-11-23 19:04:34 +00:00
|
|
|
depends_on "json-c" => :optional
|
2014-09-29 01:36:34 +00:00
|
|
|
|
2014-07-20 21:39:43 +00:00
|
|
|
skip_clean "share/clamav"
|
2010-03-17 15:48:11 +00:00
|
|
|
|
|
|
|
def install
|
2015-12-12 20:59:51 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-silent-rules
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--libdir=#{lib}
|
|
|
|
--sysconfdir=#{etc}/clamav
|
|
|
|
--disable-zlib-vcheck
|
|
|
|
--with-zlib=#{MacOS.sdk_path}/usr
|
|
|
|
--with-openssl=#{Formula["openssl"].opt_prefix}
|
|
|
|
--enable-llvm=no
|
2014-11-23 19:04:34 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
args << "--with-libjson=#{Formula["json-c"].opt_prefix}" if build.with? "json-c"
|
2016-01-04 19:58:37 +00:00
|
|
|
args << "--with-pcre=#{Formula["pcre"].opt_prefix}" if build.with? "pcre"
|
2015-12-12 20:59:51 +00:00
|
|
|
args << "--disable-yara" if build.without? "yara"
|
|
|
|
args << "--without-pcre" if build.without? "pcre"
|
2014-11-23 19:04:34 +00:00
|
|
|
|
2016-01-21 21:29:59 +00:00
|
|
|
pkgshare.mkpath
|
2015-12-12 20:59:51 +00:00
|
|
|
system "autoreconf", "-fvi" if build.head?
|
2014-11-23 19:04:34 +00:00
|
|
|
system "./configure", *args
|
2014-04-26 23:58:08 +00:00
|
|
|
system "make", "install"
|
2010-03-17 15:48:11 +00:00
|
|
|
end
|
2014-11-23 19:04:34 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
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
|
2010-03-17 15:48:11 +00:00
|
|
|
end
|