Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Rakefile for gem generation.

Also generates native gems with 'rake native gem' if rake-compiler gem is installed.
  • Loading branch information...
commit ffc9c0207fedd2dc3f31f10e232da4685507b5ea 1 parent 8648eff
@eclubb eclubb authored
Showing with 32 additions and 0 deletions.
  1. +32 −0 Rakefile
View
32 Rakefile
@@ -0,0 +1,32 @@
+require 'rake/gempackagetask'
+
+SUMMARY = 'This wrapper provides access to the functions, macros, global variables and constants ' +
+ 'of the ncurses library. These are mapped to a Ruby Module named "Ncurses": ' +
+ 'Functions and external variables are implemented as singleton functions of the Module Ncurses.'
+
+spec = Gem::Specification.new do |s|
+ s.name = 'ncurses'
+ s.email = 't-peters@users.berlios.de'
+ s.author = 'Tobias Peters'
+ s.version = '1.1'
+ s.summary = SUMMARY
+ s.platform = Gem::Platform::RUBY
+ s.has_rdoc = false
+ s.homepage = 'http://ncurses-ruby.berlios.de'
+ s.description = SUMMARY
+ s.require_paths = ["lib"]
+ s.files = Dir.glob("[A-Z]*") + Dir.glob("*.{c,h,rb}") + Dir.glob("{examples,lib}/**/*")
+ s.extensions = FileList["ext/**/extconf.rb"]
+end
+
+# add your default gem packing task
+Rake::GemPackageTask.new(spec) do |pkg|
+end
+
+begin
+ require 'rake/extensiontask'
+rescue LoadError
+ warn "To compile native gems, install rake-compiler (gem install rake-compiler)"
+else
+ Rake::ExtensionTask.new('ncurses', spec)
+end
Please sign in to comment.
Something went wrong with that request. Please try again.