I created a library for a project I was working on. Essentially, it packages imgSeek as an alternative to pHash/phashion. See this link for background:
http://hackerlabs.org/blog/2012/07/30/organizing-photos-with-duplicate-and-similarity-checking/
The library consists of a C/C++ shared library (with makefile & shit) and ruby-ffi bindings. I wanted to package this so other people could use it, but I don't really know how.
The rubygems site documents packaging a gem with C extensions, but not what I want.
I'm not sure if this is possible. Maybe what I'm supposed to do is publish the library as, say, a regular operating system package (e.g. .deb), and then publish the ffi bindings as a gem, and have the user install them separately. This sounds like a lot of work.
Is it possible to package the ffi bindings and the library together such that installing the gem causes the library to be built? That's make it a lot easier for me, personally, to get this code out to anyone who might want to use it.
The code is here:
https://bitbucket.org/dradetsky/ruby-seeklib
https://bitbucket.org/dradetsky/seeklib
This is what the ffi-compiler gem does.
You write a Rakefile that uses a mkmf like syntax to define how to build your project and then use the supplied helpers to load your library (since the built library isn't going to be in any of the standard search paths).
I don't believe you can build straight from your Makefile, however it seems simple enough that it should be easy to translate - the only thing that doesn't seem to be documented is how to change flags passed to the compiler, but it looks like
should do it.