class Rake::GemPackageTask


end
pkg.need_tar = true
pkg.need_zip = true
Rake::GemPackageTask.new(spec) do |pkg|
end
EOF
and dependencies are specified in standard Ruby syntax.
Rake is a Make-like program implemented in Ruby. Tasks
s.description = <<EOF
s.files = PKG_FILES
s.autorequire = ‘rake’
s.require_path = ‘lib’
s.requirements << ‘none’
s.version = PKG_VERSION
s.name = ‘rake’
s.summary = “Ruby based make-like utility.”
s.platform = Gem::Platform::RUBY
spec = Gem::Specification.new do |s|
require ‘rubygems’
Example using a Ruby GEM spec:
Create a Ruby GEM package with the given name and version.
[package_dir/name-version.gem”]

GemPackageTask will also generate the following tasks:
In addition to the Rake targets generated by PackageTask, a
zip files and tar/gzipped packages can be produced by this task.
Create a package based upon a Gem spec. Gem packages, as well as

def define

given to +new+).
GemPackageTask. (+define+ is automatically called if a block is
Create the Rake tasks and actions specified by this
def define
  super
  task :package => [:gem]
  desc "Build the gem file #{gem_file}"
  task :gem => ["#{package_dir}/#{gem_file}"]
  file "#{package_dir}/#{gem_file}" => [package_dir] + @gem_spec.files do
    when_writing("Creating GEM") {
      Gem::Builder.new(gem_spec).build
      verbose(true) {
        mv gem_file, "#{package_dir}/#{gem_file}"
      }
    }
  end
end

def gem_file

def gem_file
  if @gem_spec.platform == Gem::Platform::RUBY
    "#{package_name}.gem"
  else
    "#{package_name}-#{@gem_spec.platform}.gem"
  end
end

def init(gem)

operations.
Initialization tasks without the "yield self" or define
def init(gem)
  super(gem.name, gem.version)
  @gem_spec = gem
  @package_files += gem_spec.files if gem_spec.files
end

def initialize(gem_spec)

needs to be called to define the task.
if a block is given. If no block is supplied, then +define+
Create a GEM Package task library. Automatically define the gem
def initialize(gem_spec)
  init(gem_spec)
  yield self if block_given?
  define if block_given?
end