# File lib/reap/task/package.rb, line 31
  def init
    @dir          ||= ( File.directory?('../leaf') ? '../leaf' : 'pkg')

    @name         ||= master['name']
    @status       ||= master['status'] || 'beta/stable'
    @date         ||= master['date'] || Time.now.strftime("%Y-%m-%d")

    @series       ||= master['series']
    @version      ||= master['version']

    unless @series || @version
      puts "Series or Version is a required field."
      exit 0
    end

    if @version
      @package_name ||= @name + '-' + @version
    else
      @package_name ||= @name + ',' + @date
    end

    @author       ||= master['author']
    @email        ||= master['email']
    @summary      ||= master['summary']
    @project      ||= master['rubyforge']['project']
    @homepage     ||= master['homepage'] || master['rubyforge']['homepage']

    @exclude      ||= []
    @exclude      |= MUST_EXCLUDE

    # types include 'tgz', 'tbz', 'zip', 'tar.gz' 'tar.bz2' and 'gem'.
    @types        ||= master['distribute'] || [ 'gem', 'tar.gz', 'zip' ]
    @types.collect! { |t| t.to_s.strip.downcase }

    # not setable
    @include      ||= ['**/*']

    # gem specific (at least in this context)
    if defined?(Gem)
      if @platform
        begin
          @gem_platform = ::Gem.const_get(@platform)
        rescue NameError
          @platform = nil
        end
      end
      @platform = ::Gem::Platform::RUBY unless @plaform
      #@autorequire
      @requirements ||= master['requirements'] || []
      @dependencies ||= master['dependencies'] || []
      @executables  ||= master['executables']  || []
    end
  end