Skip to content

Instantly share code, notes, and snippets.

@luislavena
Created February 7, 2009 20:25
Show Gist options
  • Save luislavena/60033 to your computer and use it in GitHub Desktop.
Save luislavena/60033 to your computer and use it in GitHub Desktop.
Obsolete RubyInstaller Package structure
require 'rake'
require 'rake/clean'
namespace(:compiler) do
namespace(:mingw) do
# mingw needs downloads, sandbox and sandbox/mingw
package = RubyInstaller::MinGW
directory package.target
CLEAN.include(package.target)
# Put files for the :download task
package.files.each do |f|
file_source = "#{package.url}/#{f}"
file_target = "downloads/#{f}"
download file_target => file_source
# depend on downloads directory
file file_target => "downloads"
# download task need these files as pre-requisites
task :download => file_target
end
# Prepare the :sandbox, it requires the :download task
task :extract => [:extract_utils, :download, package.target] do
# grab the files from the download task
files = Rake::Task['compiler:mingw:download'].prerequisites
files.each { |f|
extract(File.join(RubyInstaller::ROOT, f), package.target)
}
end
end
end
task :download => ['compiler:mingw:download']
task :extract => ['compiler:mingw:extract']
# MinGW files
MinGW = OpenStruct.new(
:release => 'current',
:version => '3.4.5',
:url => "http://easynews.dl.sourceforge.net/mingw",
:target => 'sandbox/mingw',
:files => [
'binutils-2.17.50-20060824-1.tar.gz',
'gcc-core-3.4.5-20060117-3.tar.gz',
'gcc-g++-3.4.5-20060117-3.tar.gz',
'mingw-runtime-3.14.tar.gz',
'mingw-utils-0.3.tar.gz',
'w32api-3.11.tar.gz',
'gdb-6.8-mingw-3.tar.bz2'
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment