Gem install extension in sub-directory under lib?

Discussion in 'Ruby' started by Reid Morrison, Jan 19, 2007.

  1. I am in the process of setting up the Gem install packages for Ruby WMQ.

    The challenge is that I need to put the extension library wmq.so into a
    sub-directory under lib. E.g.
    lib/wmq/wmq.so

    The Gem spec is complete and includes all the required .rb files. The
    gem successfully builds and creates the necessary documentation. The
    other Ruby files are all copied across correctly into the Gem cache.
    E.g. lib/wmq/wmq_const.rb

    After building the extension through extconf.rb, the Gem install process
    moves the wmq.so file under the lib directory.

    Is there some way to tell the Gem installer to put the file wmq.so into
    lib/wmq rather than just under lib?

    Thank you
    Reid

    --
    Posted via http://www.ruby-forum.com/.
     
    Reid Morrison, Jan 19, 2007
    #1
    1. Advertising

  2. Reid Morrison wrote:
    > I am in the process of setting up the Gem install packages for Ruby WMQ.
    >
    > The challenge is that I need to put the extension library wmq.so into a
    > sub-directory under lib. E.g.
    > lib/wmq/wmq.so
    >
    > The Gem spec is complete and includes all the required .rb files. The
    > gem successfully builds and creates the necessary documentation. The
    > other Ruby files are all copied across correctly into the Gem cache.
    > E.g. lib/wmq/wmq_const.rb
    >
    > After building the extension through extconf.rb, the Gem install process
    > moves the wmq.so file under the lib directory.
    >
    > Is there some way to tell the Gem installer to put the file wmq.so into
    > lib/wmq rather than just under lib?
    >
    > Thank you
    > Reid


    Finally found the solution by digging through other projects on
    RubyForge.

    Turns out it was not Gem, but extconf.rb that needed to be modified.

    I.e. The following line in extconf.rb:
    create_makefile('wmq')
    Needed to be modified to:
    create_makefile('wmq/wmq')

    --
    Posted via http://www.ruby-forum.com/.
     
    Reid Morrison, Jan 19, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben
    Replies:
    2
    Views:
    954
  2. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    2,166
    Lawrence D'Oliveiro
    May 20, 2011
  3. Mark Volkmann
    Replies:
    7
    Views:
    179
    Mark Volkmann
    Jan 23, 2007
  4. Iñaki Baz Castillo
    Replies:
    1
    Views:
    175
    Iñaki Baz Castillo
    Feb 28, 2011
  5. Kenjis Kaan
    Replies:
    4
    Views:
    141
    Randy Kobes
    Jun 29, 2003
Loading...

Share This Page