forked from SciRuby/rb-gsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
98 lines (85 loc) · 2.45 KB
/
Rakefile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/rdoctask'
RB_GSL_VERSION = File.readlines('VERSION')[0].chomp
spec = Gem::Specification.new do |s|
# Basics
s.name = 'gsl'
s.version = RB_GSL_VERSION
s.summary = 'Ruby interface to GNU Scientific Library (NMatrix fork)'
s.description = 'Ruby/GSL is a Ruby interface to the GNU Scientific Library, for numerical computing with Ruby'
#s.platform = Gem::Platform::Ruby
s.required_ruby_version = '>= 1.8.1'
s.requirements << 'GSL (http://www.gnu.org/software/gsl/)'
# plotlib?
s.add_dependency('nmatrix', '>= 0.0.2')
# About
s.authors = ['Yoshiki Tsunesada', 'David MacMahon', 'John Woods']
s.email = 'y-tsunesada@mm.em-net.ne.jp'
s.homepage = 'http://rb-gsl.rubyforge.org/'
s.rubyforge_project = 'rb-gsl'
# Files, Libraries, and Extensions
s.files = FileList[
'AUTHORS',
'COPYING',
'ChangeLog',
'README',
'Rakefile',
'setup.rb',
'THANKS',
'VERSION',
'examples/**/*',
'ext/*',
'lib/**/*',
'include/*',
'rdoc/*',
'tests/**/*'
].to_a
s.require_paths = ['lib', 'lib/gsl', 'lib/ool', 'ext']
#s.autorequire = nil
#s.bindir = 'bin'
#s.executables = []
#s.default_executable = nil
# C compilation
s.extensions = %w[ ext/extconf.rb ]
# Documentation
s.has_rdoc = true
s.rdoc_options = [
'--title', 'Ruby/GSL',
'--main', 'rdoc/index.rdoc',
'--exclude', 'ext/',
'--exclude', 'include/',
'--exclude', 'lib/',
]
s.extra_rdoc_files = FileList['rdoc/*'].to_a
# Testing TODO
#s.test_files = []
end
Rake::PackageTask.new('rb-gsl', RB_GSL_VERSION) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
pkg.package_files = spec.files
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = false
pkg.need_tar = false
end
task :default => [:package, :gem]
# --------------------------------------------------------------------
# Create a task to build the RDOC documentation tree.
desc "Create the RDoc html files"
Rake::RDocTask.new("rdoc") { |rdoc|
rdoc.rdoc_dir = 'html'
rdoc.title = 'Ruby/GSL'
rdoc.main = 'rdoc/index.rdoc'
rdoc.options << '--exclude' << 'ext/'
rdoc.options << '--exclude' << 'include/'
rdoc.options << '--exclude' << 'lib/'
rdoc.rdoc_files.include('rdoc/*.rdoc')
}
desc "Publish the RDoc files on RubyForge"
task :pub_rdoc => ["html/index.html"] do
mkdir_p "emptydir"
sh "scp -rq html/* www.rubyforge.org:/var/www/gforge-projects/rb-gsl/."
rm_r "emptydir"
end