forked from eagleas/clamav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rakefile
54 lines (44 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
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'tools/rakehelp'
require 'spec/rake/spectask'
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
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "clamav"
gemspec.author = "Alexander Oryol"
gemspec.email = "eagle.alex@gmail.com"
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
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
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