require ‘rubygems’ require ‘rubygems/package_task’ require ‘rake/clean’ require ‘rdoc/rdoc’
temp = `git ls-files`.split(/r?n/).collect{ |i| i unless i=~/^.git/ }.compact temp.each do |f|
t = File.dirname(f) temp << t unless t == '.'
end
PKG_FILE = ‘ruby-xml-smart’ PKG_FILES = temp PKG_VERSION = File.read(‘rbxs.h’).to_s.match(/RBXS_VERSIONs+“(+)”/)[1] PKG_CURRENT = PKG_FILE + “-” + PKG_VERSION
task :default => [:compile]
desc “Installing library” task :install => [:doc] do
puts "installation not nescessary."
end
desc “Compiling library” task :compile do
puts "compiling no longer nescessary."
end
spec = Gem::Specification.new do |s|
s.name = PKG_FILE
s.version = PKG_VERSION
s.author = "Juergen Mangler"
s.email = "juergen.mangler@univie.ac.at"
s.homepage = "http://raa.ruby-lang.org/project/ruby-xml-smart/"
s.platform = Gem::Platform::RUBY
s.summary = 'easy to use and stable libxml2 binding'
s.description = File.read('README')
s.files = PKG_FILES
s.require_path = '.'
s.rdoc_options << '--charset=utf8' << '--line-numbers' << '--inline'
s.extra_rdoc_files = ["README"]
s.rubyforge_project = 'ruby-xml-smart'
s.date = Time.now
s.required_ruby_version = '>= 1.8.6'
s.add_runtime_dependency 'xml-smart', '>=0.3.0'
end
Gem::PackageTask.new(spec) do |pkg|
pkg.need_tar = true
end