2011-02-23 15:07:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-30 09:52:31 +00:00
|
|
|
class Fantom < Formula
|
2011-06-13 05:48:46 +00:00
|
|
|
url 'http://fan.googlecode.com/files/fantom-1.0.59.zip'
|
2011-02-23 15:07:41 +00:00
|
|
|
homepage 'http://fantom.org'
|
2011-06-13 05:48:46 +00:00
|
|
|
md5 '49f20d8a658e1e0b3daa861aa5287d11'
|
2011-03-30 09:52:31 +00:00
|
|
|
|
|
|
|
def options
|
|
|
|
[['--with-src', 'Also install fantom source'],
|
|
|
|
['--with-examples', 'Also install fantom examples']]
|
|
|
|
end
|
2011-02-23 15:07:41 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
rm_f Dir["bin/*.exe", "lib/dotnet/*"]
|
2011-03-30 09:52:31 +00:00
|
|
|
rm_rf Dir["examples"] unless ARGV.include? '--with-examples'
|
|
|
|
rm_rf Dir["src"] unless ARGV.include? '--with-src'
|
|
|
|
|
2011-02-23 15:07:41 +00:00
|
|
|
libexec.install Dir['*']
|
2011-03-30 09:52:31 +00:00
|
|
|
|
2011-02-23 15:07:41 +00:00
|
|
|
bin.mkpath
|
|
|
|
Dir["#{libexec}/bin/*"].each do |f|
|
|
|
|
next unless File.extname(f).empty?
|
2011-03-30 09:52:31 +00:00
|
|
|
chmod 0755, f
|
2011-02-23 15:07:41 +00:00
|
|
|
ln_s f, bin+File.basename(f)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|