-
Notifications
You must be signed in to change notification settings - Fork 9
/
rakefile
56 lines (45 loc) · 1.4 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
require 'rubygems'
require 'bundler'
require 'rake'
require 'rake/clean'
require 'rubygems/package_task'
require 'rspec'
require 'rspec/core/rake_task'
require 'jeweler'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
end
require File.expand_path('../tools/rakehelp', __FILE__)
setup_extension('clamav', 'clamav')
desc "Compile native extension"
task :compile => [:clamav]
task :default => [:compile, :spec]
#Spec::Rake::SpecTask.new do |task|
#task.libs << 'spec'
#task.spec_files = Dir.glob( 'spec/**/*_spec.rb' )
#task.verbose = true
#end
Jeweler::Tasks.new do |gemspec|
gemspec.name = "clamav"
gemspec.author = "Alexander Oryol"
gemspec.email = "[email protected]"
gemspec.summary = "ClamAV Ruby bindings"
gemspec.homepage = "http://github.com/eagleas/clamav"
gemspec.rubyforge_project = 'clamav'
gemspec.description = "ClamAV Ruby bindings"
gemspec.require_path = 'lib'
if RUBY_PLATFORM.match("win32")
gemspec.platform = Gem::Platform::WIN32
else
gemspec.platform = Gem::Platform::RUBY
gemspec.extensions = Dir.glob( 'ext/**/extconf.rb' )
end
end
task :package => [:clean, :compile, :spec]
setup_clean ["ext/clamav/*.{so,o}", "ext/clamav/Makefile", "lib/clamav.so", "pkg", "*.gem"]
task :install => [:default, :package] do
sh %{ sudo gem install pkg/clamav-#{GEM_VERSION}.gem }
end
task :uninstall do
sh %{ sudo gem uninstall clamav }
end