/Library/Formula/findbugs.rb

https://github.com/phatblat/homebrew · Ruby · 31 lines · 24 code · 6 blank · 1 comment · 0 complexity · 4dccc43488db2007fe6ccbc2cb5f9de2 MD5 · raw file

  1. require 'formula'
  2. class Findbugs < Formula
  3. homepage 'http://findbugs.sourceforge.net/index.html'
  4. url 'http://downloads.sourceforge.net/project/findbugs/findbugs/2.0.2/findbugs-2.0.2.tar.gz'
  5. sha1 '3817d96e5143f513cb2945f14f50cdb6720d1f49'
  6. conflicts_with 'fb-client',
  7. :because => "findbugs and fb-client both install a `fb` binary"
  8. def install
  9. # Remove windows files
  10. rm_f Dir["bin/*.bat"]
  11. prefix.install_metafiles
  12. libexec.install Dir['*']
  13. bin.write_exec_script libexec/'bin/fb'
  14. bin.write_exec_script libexec/'bin/findbugs'
  15. end
  16. def caveats; <<-EOS.undent
  17. Some tools might refer findbugs by env variable.
  18. After installation, set $FINDBUGS_HOME in your profile:
  19. export FINDBUGS_HOME=#{libexec}
  20. EOS
  21. end
  22. def test
  23. system "#{bin}/fb"
  24. end
  25. end