2011-04-14 01:57:04 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class BulkExtractor < Formula
|
2012-06-07 22:01:54 +00:00
|
|
|
homepage 'https://github.com/simsong/bulk_extractor/wiki'
|
2014-01-16 20:17:02 +00:00
|
|
|
url 'http://digitalcorpora.org/downloads/bulk_extractor/bulk_extractor-1.4.4.tar.gz'
|
|
|
|
sha1 'e95ed6db74d9998842089b53eb4322dd0a730a82'
|
2012-07-26 15:19:38 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :autoconf
|
|
|
|
depends_on :automake
|
2011-04-14 01:57:04 +00:00
|
|
|
|
|
|
|
depends_on 'afflib' => :optional
|
2011-04-14 03:22:48 +00:00
|
|
|
depends_on 'exiv2' => :optional
|
2011-04-14 01:57:04 +00:00
|
|
|
depends_on 'libewf' => :optional
|
|
|
|
|
2014-03-14 15:03:23 +00:00
|
|
|
# Error in exec install hooks; installing java GUI manually. Reported in
|
|
|
|
# https://groups.google.com/group/bulk_extractor-users/browse_thread/thread/ff7cc11e8e6d8e8d
|
|
|
|
patch do
|
2014-04-26 19:48:32 +00:00
|
|
|
url "https://gist.githubusercontent.com/anarchivist/3785687/raw/3a61d57539c2b9ecde44121b370db85ff9d4f86e/makefile.in.patch"
|
2014-03-14 15:03:23 +00:00
|
|
|
sha1 "0b597214c15505d84602a28b74fc01ce5aa0c902"
|
2012-09-26 03:20:58 +00:00
|
|
|
end
|
|
|
|
|
2011-04-14 01:57:04 +00:00
|
|
|
def install
|
2013-09-11 00:50:22 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
|
|
|
|
# Install documentation
|
|
|
|
(share/'bulk_extractor/doc').install Dir['doc/*.{html,txt,pdf}']
|
2011-07-05 19:49:07 +00:00
|
|
|
|
2014-01-04 13:02:36 +00:00
|
|
|
(lib/'python2.7/site-packages').install Dir['python/*.py']
|
2012-09-26 03:20:58 +00:00
|
|
|
|
|
|
|
# Install the GUI the Homebrew way
|
|
|
|
libexec.install 'java_gui/BEViewer.jar'
|
2012-08-07 18:20:52 +00:00
|
|
|
bin.write_jar_script libexec/"BEViewer.jar", "BEViewer", "-Xmx1g"
|
2011-06-14 16:21:14 +00:00
|
|
|
end
|
2014-04-13 00:44:19 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
input_file = testpath/"data.txt"
|
|
|
|
input_file.write "http://brew.sh\n(201)555-1212\n"
|
|
|
|
|
|
|
|
output_dir = testpath/"output"
|
|
|
|
system "#{bin}/bulk_extractor", "-o", output_dir, input_file
|
|
|
|
|
|
|
|
assert (output_dir/"url.txt").read.include?("http://brew.sh")
|
|
|
|
assert (output_dir/"telephone.txt").read.include?("(201)555-1212")
|
|
|
|
end
|
2011-04-14 01:57:04 +00:00
|
|
|
end
|