Bill Kelly
6/23/2005 10:07:00 PM
Hi,
I'm packaging a ruby extension, and want setup.rb to perform
a particular part of the install only on a particular platform.
I figure others may have dealt with this with their own
extensions, and I was wondering how it's usually done.
On win32, I'm including a pre-built .dll that my extension
requires, because it's kind of a pain to build on windows.
I've put the .dll in the bin/ directory - and setup.rb does
the right thing (for windows) and installs the .dll alongside
the ruby.exe binary, wherever that may be on the system.
However, on Linux, the shared library .so's needed by the
extension a) are easy to build, so I see no need to include
pre-built ones, and b) don't belong next to the ruby
executable anyway... and c) I certainly don't want the
win32 .dll copied into /usr/bin or wherever on Linux. :)
So my question is how to have setup.rb do the right thing
on windows with the files in ./bin (which it currently is)...
and basically ignore the files in ./bin on Linux.
Is it typical to just hack setup.rb to add the desired
behavior? Just wondering how it's usually done.
Thanks,
Bill