Files
RubyMotion/Rakefile
Laurent Sansonetti 40f36b93fe add gem task
2011-07-14 17:52:54 -07:00

54 lines
1.3 KiB
Ruby

PLATFORMS_DIR = '/Developer/Platforms'
SDK_VERSION = '4.3'
PROJECT_VERSION = '0.0.4'
def rake(dir, cmd='all')
Dir.chdir(dir) do
sh "rake platforms_dir=#{PLATFORMS_DIR} sdk_version=#{SDK_VERSION} #{cmd}"
end
end
targets = %w{vm data doc}
task :default => :all
task :all => targets
targets.each do |target|
task target do
rake(target)
end
end
task :clean do
targets.each { |target| rake(target, 'clean') }
end
require 'rubygems'
require 'rake/gempackagetask'
gem_spec = Gem::Specification.new do |spec|
files = []
files.concat(Dir.glob('./lib/**/*'))
files.concat(Dir.glob('./data/**/*').select { |path| File.basename(path) != 'Rakefile' })
files.concat(Dir.glob('./doc/html/**/*'))
files.concat(Dir.glob('./sample/**/*').select { |path| File.basename(path) != 'build' })
files.reject! { |path| /^\./.match(File.basename(path)) }
spec.name = 'rubixir'
spec.summary = 'Ruby runtime for iOS'
spec.description = <<-DESCRIPTION
Rubixir is an implementation of the Ruby language for the iOS mobile platform.
DESCRIPTION
#spec.author = 'todo'
#spec.email = 'todo'
#spec.homepage = 'todo'
spec.version = PROJECT_VERSION
spec.files = files
#spec.executable = 'rubixir'
end
Rake::GemPackageTask.new(gem_spec) do |pkg|
pkg.need_zip = false
pkg.need_tar = true
end