forked from eclubb/ncurses-ruby
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile.rb
executable file
·60 lines (52 loc) · 1.9 KB
/
Rakefile.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
($:.unshift File.expand_path(File.join( File.dirname(__FILE__), 'lib' ))).uniq!
require 'ncurses/etc'
require 'fileutils'
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.'
# =======================
# = Gem packaging tasks =
# =======================
begin
require 'echoe'
task :package => :'package:package'
task :install => :'package:install'
task :manifest => :'package:manifest'
task :compile => :'package:compile'
namespace :package do
Echoe.new('ncurses', Ncurses::Version) do |g|
g.author = ['Tobias Herzke', 'Simon Kaczor', 'elliottcable']
g.email = ['t-peters@users.berlios.de', 'skaczor@cox.net', 'Ncurses@elliottcable.com']
g.summary = Summary
g.url = 'http://github.com/elliottcable/ncurses'
g.development_dependencies = ['echoe >= 3.0.2']
g.extension_pattern = 'ext/**/extconf.rb'
g.manifest_name = '.manifest'
g.retain_gemspec = true
g.rakefile_name = 'Rakefile.rb'
g.ignore_pattern = /^\.git\/|\.gemspec/
end
end
rescue LoadError => e
raise e unless e.message =~ /^no such file to load -- echoe$/
desc 'You need the `echoe` gem to package Ncurses'
task :package
end
# =========
# = Other =
# =========
desc 'Removes all producs'
task :clobber do
File.open '.gitignore' do |gitignore|
gitignore.each_line do |glob|
glob.chomp!
glob.gsub! /#.*$/, ''
Dir[File.expand_path(File.join( File.dirname(__FILE__), '**', glob)).chomp].each do |file|
FileUtils.rm file
end unless glob.gsub(/\s/,'').empty?
end
end
end
desc 'Check everything over before commiting'
task :aok => [:'package:manifest', :'package:package', :'package:compile']
task :ci => []