setup extension gem

This commit is contained in:
Mike Dirolf 2009-03-19 13:12:30 -04:00
parent 4e386c8cff
commit 9e12025727
2 changed files with 10 additions and 9 deletions

View File

@ -28,14 +28,6 @@ task :publish => [:rdoc] do
Rake::RubyForgePublisher.new(GEM, RUBYFORGE_USER).upload
end
desc "Compile the extension"
task :compile do
cd 'ext/cbson'
ruby 'extconf.rb'
sh 'make'
cp "cbson.#{CONFIG['DLEXT']}", '../../lib/mongo/ext'
end
namespace :gem do
desc "Install the gem locally"
@ -47,6 +39,15 @@ gem build mongo-ruby-driver.gemspec &&
EOS
end
desc "Install the optional c extensions"
task :install_extensions do
sh <<EOS
gem build mongo-extensions.gemspec &&
sudo gem install mongo_ext-*.gem &&
rm mongo_ext-*.gem
EOS
end
end
task :default => :list

View File

@ -1,4 +1,4 @@
require 'mkmf'
dir_config('cbson')
create_makefile('mongo-ext/ext/cbson')
create_makefile('mongo_ext/cbson')