From bb863835e7f7a9406e969ab4b0ef5e9a5f93655d Mon Sep 17 00:00:00 2001 From: Maxime Nowak Date: Thu, 19 May 2011 01:54:12 +0200 Subject: [PATCH] Sonar 2.13.1 Signed-off-by: Adam Vandenberg --- Formula/sonar.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Formula/sonar.rb diff --git a/Formula/sonar.rb b/Formula/sonar.rb new file mode 100644 index 00000000000..4dce14a9407 --- /dev/null +++ b/Formula/sonar.rb @@ -0,0 +1,28 @@ +require 'formula' + +class Sonar < Formula + homepage 'http://www.sonarsource.org' + url 'http://dist.sonar.codehaus.org/sonar-2.13.1.zip' + md5 '37e0502e07e197b8e3a382c64fac8e1d' + + def install + # Delete native bin directories for other systems + rm_rf Dir['bin/{aix,hpux,linux,solaris,windows}-*'] + + if MacOS.prefer_64_bit? + rm_rf Dir['bin/macosx-universal-32'] + else + rm_rf Dir['bin/macosx-universal-64'] + end + + # Delete Windows files + rm_f Dir['war/*.bat'] + libexec.install Dir['*'] + + if MacOS.prefer_64_bit? + bin.install_symlink "#{libexec}/bin/macosx-universal-64/sonar.sh" => "sonar" + else + bin.install_symlink "#{libexec}/bin/macosx-universal-32/sonar.sh" => "sonar" + end + end +end