diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..9e11b32 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.3.1 diff --git a/clamav.gemspec b/clamav.gemspec new file mode 100644 index 0000000..b327d72 --- /dev/null +++ b/clamav.gemspec @@ -0,0 +1,71 @@ +# Generated by jeweler +# DO NOT EDIT THIS FILE +# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec` +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = %q{clamav} + s.version = "0.3.1" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["Alexander Oryol"] + s.date = %q{2009-10-16} + s.description = %q{ClamAV Ruby bindings} + s.email = %q{eagle.alex@gmail.com} + s.extensions = ["ext/clamav/extconf.rb"] + s.extra_rdoc_files = [ + "ChangeLog", + "README.rdoc" + ] + s.files = [ + ".gitignore", + "ChangeLog", + "README.rdoc", + "VERSION", + "clamav.gemspec", + "ext/clamav/clamav.c", + "ext/clamav/const.h", + "ext/clamav/extconf.rb", + "rakefile", + "spec/clamav-testfiles/clam-p.rar", + "spec/clamav-testfiles/clam-ph.rar", + "spec/clamav-testfiles/clam-v2.rar", + "spec/clamav-testfiles/clam-v3.rar", + "spec/clamav-testfiles/clam.cab", + "spec/clamav-testfiles/clam.exe", + "spec/clamav-testfiles/clam.exe.bz2", + "spec/clamav-testfiles/clam.zip", + "spec/clamav-testfiles/eicar.com", + "spec/clamav-testfiles/jquery.tooltip.pack.js", + "spec/clamav-testfiles/multi.zip", + "spec/clamav-testfiles/program.doc", + "spec/clamav-testfiles/robots.txt", + "spec/clamav-testfiles/test.rar", + "spec/clamav-testfiles/test.txt", + "spec/clamav-testfiles/\320\237\321\200\320\276\320\263\321\200\320\260\320\274\320\274\320\260.doc", + "spec/spec", + "spec/spec_helper.rb", + "spec/unit/clamav_spec.rb", + "tools/rakehelp.rb" + ] + s.homepage = %q{http://github.com/eagleas/clamav} + s.rdoc_options = ["--charset=UTF-8"] + s.require_paths = ["lib"] + s.rubyforge_project = %q{clamav} + s.rubygems_version = %q{1.3.5} + s.summary = %q{ClamAV Ruby bindings} + s.test_files = [ + "spec/spec_helper.rb", + "spec/unit/clamav_spec.rb" + ] + + if s.respond_to? :specification_version then + current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION + s.specification_version = 3 + + if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + else + end + else + end +end diff --git a/rakefile b/rakefile index b6ea1e3..55ce94e 100644 --- a/rakefile +++ b/rakefile @@ -5,8 +5,6 @@ require 'rake/gempackagetask' require 'tools/rakehelp' require 'spec/rake/spectask' -GEM_VERSION="0.3.0" - setup_extension('clamav', 'clamav') desc "Compile native extension" @@ -20,42 +18,30 @@ Spec::Rake::SpecTask.new do |task| task.verbose = true end -gemspec = Gem::Specification.new do |gemspec| - gemspec.name = "clamav" - gemspec.version = GEM_VERSION - 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 = <<-EOF - ClamAV Ruby bindings. - EOF - gemspec.files = %w( rakefile README.rdoc ChangeLog ) + - Dir.glob( 'lib/*.rb' ) + - Dir.glob( 'spec/*.rb' ) + - Dir.glob( 'spec/unit/*.rb' ) + - Dir.glob( 'spec/clamav-testfiles/*' ) + - Dir.glob( 'ext/**/*.{c,rb,h}' ) + - Dir.glob( 'tools/*.rb' ) - gemspec.require_path = 'lib' - gemspec.has_rdoc = 'false' -# gemspec.add_dependency('builder') - - if RUBY_PLATFORM.match("win32") - gemspec.platform = Gem::Platform::WIN32 - gemspec.files += [] - else - gemspec.platform = Gem::Platform::RUBY - gemspec.extensions = Dir.glob( 'ext/**/extconf.rb' ) +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] -Rake::GemPackageTask.new( gemspec ) do |task| - task.gem_spec = gemspec - task.need_tar = true -end setup_clean ["ext/clamav/*.{so,o}", "ext/clamav/Makefile", "lib/clamav.so", "pkg", "*.gem"]