2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-07 04:13:03 +00:00
|
|
|
|
|
|
|
# My god! 20,000 files?!
|
|
|
|
# TODO trim that a bit? Seems crazy.
|
|
|
|
|
2009-11-03 16:41:13 +00:00
|
|
|
class Jruby < Formula
|
2009-12-21 16:25:01 +00:00
|
|
|
url 'http://jruby.kenai.com/downloads/1.4.0/jruby-bin-1.4.0.tar.gz'
|
2009-11-03 16:41:13 +00:00
|
|
|
homepage 'http://www.jruby.org'
|
2009-12-21 16:25:01 +00:00
|
|
|
md5 'f37322c18e9134e91e064aebb4baa4c7'
|
2009-09-07 04:13:03 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
Dir.chdir 'bin' do
|
|
|
|
FileUtils.rm Dir['*.bat']
|
2009-12-18 17:58:40 +00:00
|
|
|
FileUtils.rm Dir['*.exe']
|
|
|
|
FileUtils.rm Dir['*.dll']
|
2009-09-07 04:13:03 +00:00
|
|
|
Dir['*'].each do |file|
|
|
|
|
FileUtils.mv file, "j#{file}" unless file.match /^[j_]/
|
|
|
|
end
|
|
|
|
end
|
2009-11-16 19:17:19 +00:00
|
|
|
|
|
|
|
# Only keep the MacOSX native libraries
|
|
|
|
Dir.chdir 'lib/native' do
|
|
|
|
Dir['*'].each do |file|
|
2009-12-18 17:58:40 +00:00
|
|
|
FileUtils.rm_rf file unless file == 'darwin'
|
2009-11-16 19:17:19 +00:00
|
|
|
end
|
|
|
|
end
|
2009-09-07 04:13:03 +00:00
|
|
|
|
|
|
|
prefix.install Dir['*']
|
|
|
|
end
|
2009-12-21 17:00:10 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
system "jruby -e ''"
|
|
|
|
end
|
2009-09-07 04:13:03 +00:00
|
|
|
end
|