Sha256: 29ab72ec6c6b0e80833a76268e0201f82a6da74bbd0c4a6b5d51bab4e1effad5
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
require 'tmpdir' require 'open-uri' require 'archive/tar/minitar' require 'zlib' require 'fileutils' require 'rubygems/package_task' require "bundler/gem_tasks" desc 'Add ruby headers under lib for a given VERSION' task :add_source do version = ENV['VERSION'] or abort "Need a $VERSION" ruby_dir = "ruby-#{version}" uri_path = "http://ftp.ruby-lang.org/pub/ruby/1.9/#{ruby_dir}.tar.gz" dest_dir = File.dirname(__FILE__) + "/lib/debugger/ruby_core_source/#{ruby_dir}" puts "Downloading #{uri_path}..." temp = open(uri_path) puts "Unpacking #{uri_path}..." tgz = Zlib::GzipReader.new(File.open(temp, "rb")) FileUtils.mkdir_p(dest_dir) Dir.mktmpdir do |dir| inc_dir = dir + "/" + ruby_dir + "/*.inc" hdr_dir = dir + "/" + ruby_dir + "/*.h" Archive::Tar::Minitar.unpack(tgz, dir) FileUtils.cp(Dir.glob([ inc_dir, hdr_dir ]), dest_dir) end end base_spec = eval(File.read('ace-debugger-ruby_core_source.gemspec'), binding, 'ace-debugger-ruby_core_source.gemspec') Gem::PackageTask.new(base_spec) do |pkg| pkg.need_tar = true end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ace-debugger-ruby_core_source-1.1.5 | Rakefile |