2011-09-07 02:54:03 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class RubyBuild < Formula
|
|
|
|
homepage 'https://github.com/sstephenson/ruby-build'
|
2012-11-10 21:45:50 +00:00
|
|
|
url 'https://github.com/sstephenson/ruby-build/tarball/v20121110'
|
|
|
|
sha1 'dcb6d3710a7cc87e534d547fac7513685344f61a'
|
2011-09-07 02:54:03 +00:00
|
|
|
|
|
|
|
head 'https://github.com/sstephenson/ruby-build.git'
|
|
|
|
|
2012-10-30 14:29:21 +00:00
|
|
|
option "without-rbenv", "Don't install as an rbenv plugin"
|
|
|
|
|
|
|
|
depends_on 'rbenv' unless build.include? 'without-rbenv'
|
|
|
|
|
2011-09-07 02:54:03 +00:00
|
|
|
def install
|
|
|
|
ENV['PREFIX'] = prefix
|
|
|
|
system "./install.sh"
|
2012-10-30 14:29:21 +00:00
|
|
|
|
2012-11-01 11:12:45 +00:00
|
|
|
rbenv_plugins = "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins"
|
|
|
|
mkdir_p rbenv_plugins
|
|
|
|
ln_sf opt_prefix, "#{rbenv_plugins}/#{name}" unless build.include? 'without-rbenv'
|
2011-09-07 02:54:03 +00:00
|
|
|
end
|
|
|
|
end
|