Hi rubyists,
Working toward Ruby 2.1.0 in Fedora, there are going to be necessary
some changes to gems with binary extensions. In short, the extensions
are not installed into %{buildroot}%{gem_extdir_mri}/REQUIRE_PATHS/
anymore, but %{buildroot}%{gem_extdir_mri}/ will be used for the future.
This is improvement and this change is coming from RubyGems upstream. It
should also simplify the guidelines a bit [1] (on the first look).
Unfortunately, although the resulting rubygem- packages are much nicer
and closer to upstream then they used to be, the way how to create them
got uglier :/ You can see changes needed to make rubygem-bcrypt-ruby
compatible with new RubyGems in attached diff.
Since I am not happy about the situation, I'd like to ask you for your
feedback, how would you envision to simplify this process.
I am thinking about several possibilities:
1) Modify our operating_system.rb and let it treat gem installation into
%{buildroot} specially
2) Use some environment variable, to let RubyGems know, that we need to
treat %{buildroot} similarly to system directories
3) Introduce some additional parameter to gem install command, which
will modify the --install-dir option to install extensions properly
4) Introduce some RPM macros which will handle all this stuff for us.
Please let me know if you have another bright idea :)
Thanks
Vít
[1]
https://fedoraproject.org/wiki/Packaging:Ruby#Building_gems