2011-12-25 18:40:10 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Findbugs < Formula
|
|
|
|
homepage 'http://findbugs.sourceforge.net/index.html'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/findbugs/findbugs/2.0.2/findbugs-2.0.2.tar.gz'
|
2013-03-28 23:38:02 +00:00
|
|
|
sha1 '3817d96e5143f513cb2945f14f50cdb6720d1f49'
|
2011-12-25 18:40:10 +00:00
|
|
|
|
2013-08-17 17:20:11 +00:00
|
|
|
conflicts_with 'fb-client',
|
|
|
|
:because => "findbugs and fb-client both install a `fb` binary"
|
|
|
|
|
2011-12-25 18:40:10 +00:00
|
|
|
def install
|
|
|
|
# Remove windows files
|
|
|
|
rm_f Dir["bin/*.bat"]
|
2012-11-11 19:20:09 +00:00
|
|
|
prefix.install_metafiles
|
2011-12-25 18:40:10 +00:00
|
|
|
libexec.install Dir['*']
|
|
|
|
|
2012-08-07 18:20:52 +00:00
|
|
|
bin.write_exec_script libexec/'bin/fb'
|
|
|
|
bin.write_exec_script libexec/'bin/findbugs'
|
2011-12-25 18:40:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Some tools might refer findbugs by env variable.
|
|
|
|
After installation, set $FINDBUGS_HOME in your profile:
|
|
|
|
export FINDBUGS_HOME=#{libexec}
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2011-12-25 18:40:10 +00:00
|
|
|
system "#{bin}/fb"
|
|
|
|
end
|
|
|
|
end
|