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'
|
2012-09-26 03:20:58 +00:00
|
|
|
url 'https://github.com/downloads/simsong/bulk_extractor/bulk_extractor-1.3.tar.gz'
|
|
|
|
sha1 '137a8a9c9d99f5f01eb09c080012b13ba48856ec'
|
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
|
|
|
|
|
2012-09-26 03:20:58 +00:00
|
|
|
def patches
|
|
|
|
# Error in exec install hooks; installing java GUI manually. Reported in
|
|
|
|
# https://groups.google.com/group/bulk_extractor-users/browse_thread/thread/ff7cc11e8e6d8e8d
|
|
|
|
"https://gist.github.com/raw/3785687/20a2354930242db502169e1ea78499b40ec97239/gistfile1.txt"
|
|
|
|
end
|
|
|
|
|
2011-04-14 01:57:04 +00:00
|
|
|
def install
|
2012-04-23 04:16:49 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2011-04-14 01:57:04 +00:00
|
|
|
"--prefix=#{prefix}"
|
2012-09-26 03:20:58 +00:00
|
|
|
system "make"
|
2011-04-14 01:57:04 +00:00
|
|
|
system "make install"
|
2011-06-14 16:21:14 +00:00
|
|
|
|
2011-07-05 19:49:07 +00:00
|
|
|
# Install documentation
|
2012-07-26 15:19:38 +00:00
|
|
|
(share/'bulk_extractor/doc').install Dir['doc/*.{html,txt,pdf}']
|
2011-07-05 19:49:07 +00:00
|
|
|
|
2011-06-14 16:21:14 +00:00
|
|
|
# Install Python utilities
|
2012-07-26 15:19:38 +00:00
|
|
|
(share/'bulk_extractor/python').install Dir['python/*.py']
|
2012-09-26 03:20:58 +00:00
|
|
|
|
|
|
|
# Install the GUI the Homebrew way
|
|
|
|
libexec.install 'java_gui/BEViewer.jar'
|
|
|
|
(bin+'BEViewer').write script
|
|
|
|
end
|
|
|
|
|
|
|
|
def script; <<-EOS.undent
|
|
|
|
#!/bin/sh
|
|
|
|
exec java -Xmx1g -jar #{libexec}/BEViewer.jar "$@"
|
|
|
|
EOS
|
2011-06-14 16:21:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
You may need to add the directory containing the Python bindings to your PYTHONPATH:
|
2012-07-26 15:19:38 +00:00
|
|
|
#{share}/bulk_extractor/python
|
2011-06-14 16:21:14 +00:00
|
|
|
EOS
|
2011-04-14 01:57:04 +00:00
|
|
|
end
|
|
|
|
end
|