From d4b41966e81f688c508b0305b688b6b696a4dd78 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sun, 23 Nov 2014 19:04:34 +0000 Subject: [PATCH] clamav 0.98.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version bump, fixed head, new optional dependency, moves the sysconf dir to a directory inside HOMEBREW_PREFIX/etc to make it a little tidier, adds some caveats to explain clamav’s confusing error messages on initial run. Adds a test. Closes Homebrew/homebrew#34403. Signed-off-by: Mike McQuaid --- Formula/clamav.rb | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/Formula/clamav.rb b/Formula/clamav.rb index 7d7c9a29e1..2dabc11b75 100644 --- a/Formula/clamav.rb +++ b/Formula/clamav.rb @@ -2,30 +2,54 @@ require "formula" class Clamav < Formula homepage "http://www.clamav.net/" - head "https://github.com/vrtadmin/clamav-devel" - url "https://downloads.sourceforge.net/clamav/clamav-0.98.4.tar.gz" - sha1 "f1003d04f34efb0aede05395d3c7cc22c944e4ef" + url "https://downloads.sourceforge.net/clamav/clamav-0.98.5.tar.gz" + sha1 "5f5e45735819e3ca61610899b779172a5639f70f" bottle do - revision 1 sha1 "3cec3e85844d54a629a735a4cd035475af1a62b4" => :mavericks sha1 "2f7e1f591e956369eae6446e4a5aeb4ee79940e4" => :mountain_lion sha1 "07e9159ecbf0aa90dd56a7ee9d728b7bb77d5b6b" => :lion end + head do + url "https://github.com/vrtadmin/clamav-devel.git" + + depends_on "automake" => :build + depends_on "autoconf" => :build + depends_on "libtool" => :build + end + depends_on "openssl" + depends_on "json-c" => :optional skip_clean "share/clamav" def install + args = [ "--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}" + ] + + args << "--with-libjson=#{Formula["json-c"].opt_prefix}" if build.with? "json-c" + (share/"clamav").mkpath - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--libdir=#{lib}", - "--sysconfdir=#{etc}", - "--disable-zlib-vcheck", - "--with-zlib=#{MacOS.sdk_path}/usr", - "--with-openssl=#{Formula["openssl"].opt_prefix}" + system "autoreconf", "-i" if build.head? + system "./configure", *args system "make", "install" end + + 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 end