Skip to content

Instantly share code, notes, and snippets.

@seymores
Created September 4, 2011 16:03
Show Gist options
  • Save seymores/1193071 to your computer and use it in GitHub Desktop.
Save seymores/1193071 to your computer and use it in GitHub Desktop.
Homebrew formula to install Scala 2.9.1 final
require 'formula'
class ScalaDocs < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final-devel-docs.tgz'
version '2.9.1'
md5 'acb16cbdf46f682806f60b052707b7b7'
end
class Scala < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final.tgz'
version '2.9.1'
md5 '1a06eacc7f59f279bf1700c98d5bf19d'
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['*']
bin.mkpath
Dir["#{libexec}/bin/*"].each { |f| ln_s f, bin }
if ARGV.include? '--with-docs'
ScalaDocs.new.brew { doc.install Dir['*'] }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment