2011-09-07 02:54:03 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class RubyBuild < Formula
|
|
|
|
homepage 'https://github.com/sstephenson/ruby-build'
|
2012-12-27 16:31:34 +00:00
|
|
|
url 'https://github.com/sstephenson/ruby-build/tarball/v20121227'
|
|
|
|
sha1 'db33874fdb2f260fcbcc2202364e5d3cfc261fe6'
|
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
|