[Rubygems-developers] Binary gems or extension source - which and how?

Ryan Davis ryand-ruby at zenspider.com
Thu May 22 17:21:10 EDT 2008

On May 21, 2008, at 18:09 , Luis Lavena wrote:

> You need to tweak somehow the spec Hoe generates inside the Hoe.new
> do...end block.
> AFAIK, right now Hoe is not able to handle normal C extensions, only
> inlined ones (the ones generated via RubyInline).

not true:

# -*- ruby -*-

require 'rubygems'
require 'hoe'

EXT = "ext/blah.#{Hoe::DLEXT}"

class Blah
   VERSION = '1.0.0'

Hoe.new('blah', Blah::VERSION) do |p|
   p.developer('FIX', 'FIX at example.com')

   p.spec_extras[:extensions] = "ext/extconf.rb"
   p.clean_globs << EXT << "ext/*.o" << "ext/Makefile"

task :test => EXT

file EXT => ["ext/extconf.rb", "ext/blah.c"] do
   Dir.chdir "ext" do
     ruby "extconf.rb"
     sh "make"

# vim: syntax=Ruby

More information about the Rubygems-developers mailing list