2012-01-06 21:14:46 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Binwalk < Formula
|
|
|
|
homepage 'http://code.google.com/p/binwalk/'
|
2013-10-29 22:15:26 +00:00
|
|
|
url 'https://binwalk.googlecode.com/files/binwalk-1.2.2-1.tar.gz'
|
|
|
|
sha1 '3422427a326f58a5b04616111ee66a8c2fddec1d'
|
2012-01-06 21:14:46 +00:00
|
|
|
|
2013-10-29 22:15:26 +00:00
|
|
|
depends_on 'libmagic' => 'with-python'
|
|
|
|
|
|
|
|
option 'with-matplotlib', 'Check for presence of matplotlib, which is required for entropy graphing support'
|
2014-01-04 13:02:23 +00:00
|
|
|
depends_on 'matplotlib' => :python if build.with? 'matplotlib'
|
|
|
|
depends_on :python
|
2012-01-06 21:14:46 +00:00
|
|
|
|
|
|
|
def install
|
2012-02-21 06:07:32 +00:00
|
|
|
cd "src" do
|
2014-01-04 13:02:23 +00:00
|
|
|
system "python", "setup.py", "install", "--no-prereq-checks", "--prefix=#{prefix}"
|
2014-01-04 14:54:03 +00:00
|
|
|
bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
|
2012-02-21 06:07:32 +00:00
|
|
|
end
|
2012-01-06 21:14:46 +00:00
|
|
|
end
|
2014-01-04 14:53:54 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
touch "binwalk.test"
|
|
|
|
system "#{bin}/binwalk", "binwalk.test"
|
|
|
|
end
|
2012-01-06 21:14:46 +00:00
|
|
|
end
|