Sha256: 69791f25d5f199127e04f4df2ce9bfb4c60386f40455348003a82d9f0842de07

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

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 = "warp-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.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
  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
warp-clamav-0.3.1 rakefile