require 'rubygems'

version = '1.5.0147'

directory 'lib'

task :gem => 'lib' do
  # Because this gem is almost entirely sourced from JRuby proper,
  # we copy pieces into it.

  cp '../../lib/ruby/shared/bouncy-castle-java.rb', 'lib'
  cp '../../build_lib/bcprov-jdk15on-147.jar', 'lib'
  cp '../../build_lib/bcpkix-jdk15on-147.jar', 'lib'

  spec = Gem::Specification.new do |s|
    s.name = 'bouncy-castle-java'
    s.version = version
    s.author = 'Hiroshi Nakamura'
    s.email = 'nahi@ruby-lang.org'
    s.rubyforge_project = "jruby-extras"
    s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/'
    s.summary = 'Gem redistribution of Bouncy Castle jars'
    s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html'
    s.platform = Gem::Platform::RUBY
    s.require_path = 'lib'
    s.files = ['README', 'LICENSE.html', 'lib/bcprov-jdk15on-147.jar', 'lib/bcpkix-jdk15on-147.jar', 'lib/bouncy-castle-java.rb']
  end
  filename = Gem::Builder.new(spec).build
end

task :default => :gem
