-
Notifications
You must be signed in to change notification settings - Fork 24
/
Rakefile
38 lines (30 loc) · 883 Bytes
/
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
require 'rubygems'
gem 'hoe', '>=1.8.3','<= 1.12.2'
require 'hoe'
task :default => ["sync_files","make_gem"]
EXT = "ext/svm?.#{Hoe::DLEXT}"
Hoe.new('libsvm-ruby-swig', '0.5.0') do |p|
p.author = 'Tom Zeng'
p.email = '[email protected]'
p.url = 'http://www.tomzconsulting.com'
p.summary = 'Ruby wrapper of LIBSVM using SWIG'
p.description = 'Ruby wrapper of LIBSVM using SWIG'
p.spec_extras[:extensions] = "ext/extconf.rb"
p.clean_globs << EXT << "ext/*.o" << "ext/Makefile"
end
task :make_gem => EXT
file EXT => ["ext/extconf.rb", "ext/libsvm_wrap.cxx", "ext/svm.cpp", "ext/svm.h"] do
Dir.chdir "ext" do
ruby "extconf.rb"
sh "make"
end
end
task :sync_files do
cp "libsvm-3.1/svm.h","ext/"
cp "libsvm-3.1/svm.cpp","ext/"
cp "libsvm-3.1/ruby/libsvm_wrap.cxx","ext/"
cp "libsvm-3.1/ruby/svm.rb","lib/"
end
task :test do
puts "done"
end