2013-08-11 14:25:12 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Namebench < Formula
|
|
|
|
homepage 'https://code.google.com/p/namebench/'
|
|
|
|
url 'https://namebench.googlecode.com/files/namebench-1.3.1-source.tgz'
|
|
|
|
sha1 '2e6ca5a4f20512cb967c5ac43b023cc38c271131'
|
|
|
|
|
|
|
|
option 'no-third-party', 'Do not install bundled third-party modules'
|
|
|
|
|
|
|
|
def install
|
2014-05-01 20:09:07 +00:00
|
|
|
ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
|
2013-08-11 14:25:12 +00:00
|
|
|
ENV['NO_THIRD_PARTY']='1' if build.include?('no-third-party')
|
|
|
|
|
2014-01-04 13:11:35 +00:00
|
|
|
system "python", "setup.py", "install", "--prefix=#{prefix}",
|
|
|
|
"--install-data=#{lib}/python2.7/site-packages"
|
2013-08-11 14:25:12 +00:00
|
|
|
|
2014-05-01 20:09:07 +00:00
|
|
|
bin.install "namebench.py" => "namebench"
|
|
|
|
bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
|
2013-08-11 14:25:12 +00:00
|
|
|
end
|
2014-05-01 20:09:13 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/namebench", "--query_count", "1", "--only", "8.8.8.8"
|
|
|
|
end
|
2013-08-11 14:25:12 +00:00
|
|
|
end
|