homebrew-core/Formula/jruby.rb
Adam Vandenberg 706b783af0 jruby 1.7.0
2012-10-22 11:09:14 -07:00

35 lines
768 B
Ruby

require 'formula'
class Jruby < Formula
homepage 'http://www.jruby.org'
url 'http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-src-1.7.0.tar.gz'
sha1 '09d432ab05df0826800890747d6019b36b265bf9'
env :std
def install
# Remove Windows files
rm Dir['bin/*.{bat,dll,exe}']
# Prefix a 'j' on some commands
cd 'bin' do
Dir['*'].each do |file|
mv file, "j#{file}" unless file.match /^[j]/
end
end
# Only keep the OS X native libraries
cd 'lib/native' do
Dir['*'].each do |file|
rm_rf file unless file.downcase == 'darwin'
end
end
libexec.install Dir['*']
bin.install_symlink Dir["#{libexec}/bin/*"]
end
def test
system "#{bin}/jruby", "-e", "puts 'hello'"
end
end