2011-05-18 23:54:12 +00:00
|
|
|
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']
|
2012-02-22 00:48:12 +00:00
|
|
|
else
|
2011-05-18 23:54:12 +00:00
|
|
|
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"
|
2012-02-22 00:48:12 +00:00
|
|
|
else
|
2011-05-18 23:54:12 +00:00
|
|
|
bin.install_symlink "#{libexec}/bin/macosx-universal-32/sonar.sh" => "sonar"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|