Skip to content

Commit

Permalink
update ruby install task to use libyaml + libffi
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Nov 8, 2011
1 parent c9e6434 commit 7939f2b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Rakefile
Expand Up @@ -103,12 +103,18 @@ task "ruby:install", :version do |t, args|
version = args[:version] version = args[:version]
name = "ruby-#{version}" name = "ruby-#{version}"
prefix = "/app/vendor/#{name}" prefix = "/app/vendor/#{name}"
usr_dir = "usr"
Dir.mktmpdir("ruby-") do |tmpdir| Dir.mktmpdir("ruby-") do |tmpdir|
Dir.chdir(tmpdir) do |dir| Dir.chdir(tmpdir) do |dir|
FileUtils.rm_rf("#{tmpdir}/*") FileUtils.rm_rf("#{tmpdir}/*")


sh "curl http://ftp.ruby-lang.org/pub/ruby/1.9/#{name}.tar.gz -s -o - | tar vzxf -" sh "curl http://ftp.ruby-lang.org/pub/ruby/1.9/#{name}.tar.gz -s -o - | tar vzxf -"
sh "vulcan build -v -o #{name}.tgz --source #{name} --command=\"./configure --disable-install-doc --prefix #{prefix} && make && make install\"" FileUtils.mkdir_p("#{name}/#{usr_dir}")
Dir.chdir("#{name}/#{usr_dir}") do
sh "curl #{VENDOR_URL}/libyaml-0.1.4.tgz -s -o - | tar vzxf -"
sh "curl #{VENDOR_URL}/libffi-3.0.10.tgz -s -o - | tar vzxf -"
end
sh "vulcan build -v -o #{name}.tgz --source #{name} --command=\"mv usr /tmp && ./configure --disable-install-doc --prefix #{prefix} && env CPATH=/tmp/#{usr_dir}/include:\\$CPATH CPPATH=/tmp/#{usr_dir}/include:\\$CPPATH LIBRARY_PATH=/tmp/#{usr_dir}/lib:\\$LIBRARY_PATH make && make install\""
s3_upload(tmpdir, name) s3_upload(tmpdir, name)
end end
end end
Expand Down

0 comments on commit 7939f2b

Please sign in to comment.