Gemspec: How to install a Ruby extension into GEM/lib/SOME_DIR/ rather than GEM/lib/

Hi, supposing a gemspec containing:

  Gem::Specification.new do |spec|
    spec.name = "xxx-handler"
    [...]
    spec.extensions = ["ext/xxx_parser/extconf.rb"]
  end

when running "gem install xx-handler" the compiled extension
xxx_parser.so is installed into GEMS_DIR/xxx-handler/lib/ directory.
Is it possible to tell the gemspec file to install the extension in a
subdirectory within GEMS_DIR/xxx-handler/lib/ ?

Thanks a lot.

···

--
Iñaki Baz Castillo
<ibc@aliax.net>

Solved. Using "create_makefile(dir/name)" does the work (thanks to Luis Lavena).

···

2011/2/28 Iñaki Baz Castillo <ibc@aliax.net>:

when running "gem install xx-handler" the compiled extension
xxx_parser.so is installed into GEMS_DIR/xxx-handler/lib/ directory.
Is it possible to tell the gemspec file to install the extension in a
subdirectory within GEMS_DIR/xxx-handler/lib/ ?

--
Iñaki Baz Castillo
<ibc@aliax.net>