Ok, after some digging (and some vague guessing :-Δ) I found the solution:
I just got some code for my gemspec (from Writehack.com), that was so:
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
the problem with this method is that you'd have to have the just-to compile-binaries already in your repository. the correct way was to get the *.c-files from ext-directory and rename them to *.so like this:
s.executables = s.files.grep(%r{^ext/.*c$}).map{ |f| File.basename(f, '.c') + '.so'}
s.bindir = 'bin'
and also adding a bindir to Rakefile
's ExtensionTask and make it get its files from spec:
spec = Gem::Specification.load('Q.gemspec')
spec.executables.each do |f|
Rake::ExtensionTask.new('Q', spec) do |ext|
ext.name = f.gsub(/\.so$/,'')
ext.tmp_dir = 'tmp'
ext.lib_dir = 'bin'
end
end
:-Δ