homebrew-core/Formula/scala.rb

41 lines
1.1 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class ScalaDocs < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1-1-devel-docs.tgz'
md5 '6bfdd990c379c1b2c87335c89f6c444c'
end
class ScalaCompletion < Formula
homepage 'http://www.scala-lang.org/'
url 'https://raw.github.com/scala/scala-dist/27bc0c25145a8/completion.d/2.9.1/scala'
version '2.9.1'
md5 '40cb02604b718fd0977a12d932b9e693'
end
2011-03-10 05:11:03 +00:00
class Scala < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1-1.tgz'
md5 'bde2427b3f56e9c5ccb86a4376ac0d93'
def options
[['--with-docs', 'Also install library documentation']]
end
def install
rm_f Dir["bin/*.bat"]
doc.install Dir['doc/*']
man1.install Dir['man/man1/*']
libexec.install Dir['*']
2012-02-12 19:16:05 +00:00
bin.install_symlink Dir["#{libexec}/bin/*"]
ScalaCompletion.new.brew { (prefix+'etc/bash_completion.d').install 'scala' }
ScalaDocs.new.brew { doc.install Dir['*'] } if ARGV.include? '--with-docs'
end
def caveats; <<-EOS.undent
Bash completion has been installed to:
#{etc}/bash_completion.d
EOS
end
end