| |   |
| 1 | |
| 2 | |
| 3 | PROJECT_NAME = PKG_NAME = 'rust' |
| 4 | |
| 5 | PKG_VERSION = "2008.1" |
| 6 | PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" |
| 7 | |
| 8 | desc 'Generate RDoc' |
| 9 | rd = Rake::RDocTask.new do |rdoc| |
| 10 | rdoc.rdoc_dir = 'doc/output/rdoc' |
| 11 | rdoc.options << '--title' << 'Docurb' << '--line-numbers' << |
| 12 | '--inline-source' << '--accessor' << 'delegate' << '--main' << 'README' |
| 13 | rdoc.rdoc_files.include('README', 'COPYING', 'lib/*.rb', 'lib/rust/**/*.rb') |
| 14 | end |
| 15 | |
| 16 | spec = Gem::Specification.new do |s| |
| 17 | s.name = PKG_NAME |
| 18 | s.version = PKG_VERSION |
| 19 | s.summary = 'Rust is a Ruby extensions generator' |
| 20 | s.description = <<-end_description |
| 21 | Rust is a Ruby extensions generator, designed to allow easy generation of Ruby extensions based on C++ libraries (but not limited to). |
| 22 | end_description |
| 23 | |
| 24 | s.files = FileList[ |
| 25 | '[A-Z]*', |
| 26 | 'lib/*.rb', |
| 27 | 'lib/rust/*.rb', |
| 28 | 'lib/rust/templates/*.rusttpl', |
| 29 | 'include/*.hh' |
| 30 | ].to_a |
| 31 | |
| 32 | # s.add_dependency("") |
| 33 | s.autorequire = 'rust' |
| 34 | s.author = ["Diego Pettenò"] |
| 35 | s.email = "flameeyes@gmail.com" |
| 36 | s.homepage = "http://rust.rubyforge.org" |
| 37 | s.rubyforge_project = "rust" |
| 38 | end |
| 39 | |
| 40 | desc 'Generate Docurb Gem' |
| 41 | Rake::GemPackageTask.new(spec) do |pkg| |
| 42 | pkg.need_zip = true |
| 43 | pkg.need_tar = true |
| 44 | end |
| 45 | |
| 46 | desc 'Publish Docurb packages on RubyForge' |
| 47 | task :publish_rust_packages => [:verify_user, :package] do |
| 48 | release_files = FileList[ |
| 49 | "pkg/#{PKG_FILE_NAME}.gem", |
| 50 | "pkg/#{PKG_FILE_NAME}.tgz", |
| 51 | "pkg/#{PKG_FILE_NAME}.zip" |
| 52 | ] |
| 53 | require 'meta_project' |
| 54 | require 'rake/contrib/xforge' |
| 55 | |
| 56 | Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PROJECT_NAME)) do |xf| |
| 57 | xf.user_name = ENV['RUBYFORGE_USER'] |
| 58 | xf.files = release_files.to_a |
| 59 | xf.release_name = "rust #{PKG_VERSION}" |
| 60 | end |
| 61 | end |
| toggle raw diff |
--- /dev/null
+++ b/tasks/distribution.rake
@@ -0,0 +1,61 @@
+
+
+PROJECT_NAME = PKG_NAME = 'rust'
+
+PKG_VERSION = "2008.1"
+PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
+
+desc 'Generate RDoc'
+rd = Rake::RDocTask.new do |rdoc|
+ rdoc.rdoc_dir = 'doc/output/rdoc'
+ rdoc.options << '--title' << 'Docurb' << '--line-numbers' <<
+ '--inline-source' << '--accessor' << 'delegate' << '--main' << 'README'
+ rdoc.rdoc_files.include('README', 'COPYING', 'lib/*.rb', 'lib/rust/**/*.rb')
+end
+
+spec = Gem::Specification.new do |s|
+ s.name = PKG_NAME
+ s.version = PKG_VERSION
+ s.summary = 'Rust is a Ruby extensions generator'
+ s.description = <<-end_description
+Rust is a Ruby extensions generator, designed to allow easy generation of Ruby extensions based on C++ libraries (but not limited to).
+ end_description
+
+ s.files = FileList[
+ '[A-Z]*',
+ 'lib/*.rb',
+ 'lib/rust/*.rb',
+ 'lib/rust/templates/*.rusttpl',
+ 'include/*.hh'
+ ].to_a
+
+# s.add_dependency("")
+ s.autorequire = 'rust'
+ s.author = ["Diego Pettenò"]
+ s.email = "flameeyes@gmail.com"
+ s.homepage = "http://rust.rubyforge.org"
+ s.rubyforge_project = "rust"
+end
+
+desc 'Generate Docurb Gem'
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.need_zip = true
+ pkg.need_tar = true
+end
+
+desc 'Publish Docurb packages on RubyForge'
+task :publish_rust_packages => [:verify_user, :package] do
+ release_files = FileList[
+ "pkg/#{PKG_FILE_NAME}.gem",
+ "pkg/#{PKG_FILE_NAME}.tgz",
+ "pkg/#{PKG_FILE_NAME}.zip"
+ ]
+ require 'meta_project'
+ require 'rake/contrib/xforge'
+
+ Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PROJECT_NAME)) do |xf|
+ xf.user_name = ENV['RUBYFORGE_USER']
+ xf.files = release_files.to_a
+ xf.release_name = "rust #{PKG_VERSION}"
+ end
+end |