2016-07-31 18:32:31 +00:00
|
|
|
require File.expand_path("../Abstract/abstract-osquery-formula", __FILE__)
|
|
|
|
|
|
|
|
class Yara < AbstractOsqueryFormula
|
|
|
|
desc "Malware identification and classification tool"
|
2016-09-28 21:16:39 +00:00
|
|
|
homepage "https://github.com/VirusTotal/yara/"
|
|
|
|
head "https://github.com/VirusTotal/yara.git"
|
2017-05-24 07:22:58 +00:00
|
|
|
revision 101
|
2016-07-31 18:32:31 +00:00
|
|
|
|
|
|
|
bottle do
|
|
|
|
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
|
|
|
|
cellar :any_skip_relocation
|
2017-05-24 07:22:58 +00:00
|
|
|
sha256 "645665d4b083262f89895e2ba17702e40e5022dfcad2ef6b7599962a6232aaea" => :sierra
|
|
|
|
sha256 "dfab5e0b5061d3075a0d20ac7a9455196da4606233e8dca89206b8a23af15e64" => :x86_64_linux
|
2016-07-31 18:32:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
stable do
|
2016-09-28 21:16:39 +00:00
|
|
|
url "https://github.com/VirusTotal/yara/archive/v3.5.0.tar.gz"
|
|
|
|
sha256 "4bc72ee755db85747f7e856afb0e817b788a280ab5e73dee42f159171a9b5299"
|
2016-07-31 18:32:31 +00:00
|
|
|
|
|
|
|
patch do
|
2017-05-21 17:59:19 +00:00
|
|
|
# Fixes variable redefinitions.
|
|
|
|
url "https://github.com/VirusTotal/yara/commit/a0bb3836f16e3c5d0c2a1da097a1ebacbebc3a94.patch"
|
|
|
|
sha256 "dd21219d8137bc8167c7051ea0346119843f4e37c84b1a3b96418fa7e8e62179"
|
2016-07-31 18:32:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
|
|
|
|
depends_on "pcre"
|
|
|
|
depends_on "openssl"
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.cxx11
|
|
|
|
|
|
|
|
# Use of "inline" requires gnu89 semantics
|
|
|
|
ENV.append "CFLAGS", "-std=gnu89" if ENV.compiler == :clang
|
|
|
|
|
|
|
|
# find Homebrew's libpcre
|
|
|
|
ENV.append "LDFLAGS", "-L#{Formula["pcre"].opt_lib} -lpcre"
|
|
|
|
|
|
|
|
system "./bootstrap.sh"
|
|
|
|
system "./configure", "--disable-silent-rules",
|
|
|
|
"--disable-dependency-tracking",
|
2017-05-21 17:59:19 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-shared",
|
|
|
|
"--enable-static"
|
2016-07-31 18:32:31 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|