#168 Better elaborate placement of RubyGems binary extensions
Closed: Fixed None Opened 11 years ago by vondruch.

{{{

If there are C extensions, mv them to the extdir.

You should replace REQUIRE_PATHS with the first value of the require_paths field in

the gemspec file. It will typically be either "lib" or "ext". For instance:

s.require_paths = ["lib"]

mkdir -p %{buildroot}%{gem_extdir}/REQUIRE_PATHS
mv %{buildroot}%{gem_instdir}/REQUIRE_PATHS/shared_object.so %{buildroot}%{gem_extdir}/REQUIRE_PATHS/
}}}

This code sample, which is coming from Ruby packaging guidelines [1] seems to be confusing to packagers. Can we elaborate better?

I'd like to see this split into simpler example:

{{{

If there are C extensions, mv them to the extdir.

You must replace REQUIRE_PATHS according to your gem specifics.

mkdir -p %{buildroot}%{gem_extdir}/REQUIRE_PATHS
mv %{buildroot}%{gem_instdir}/REQUIRE_PATHS/shared_object.so %{buildroot}%{gem_extdir}/REQUIRE_PATHS/
}}}

and later some detailed explanation:

You should replace REQUIRE_PATHS with the first value of the require_paths field in the gemspec file. It will typically be either "lib" or "ext". For instance if you find following line in your gemspec file:

{{{
s.require_paths = ["lib"]
}}}

then the example above would look like:

{{{
mkdir -p %{buildroot}%{gem_extdir}/lib
mv %{buildroot}%{gem_instdir}/lib/shared_object.so %{buildroot}%{gem_extdir}/lib/
}}}

[1] https://fedoraproject.org/wiki/Packaging:Ruby#Building_gems


Clarification approved (+1:5, 0:0, -1:0)

Metadata Update from @spot:
- Issue assigned to spot

7 years ago

Login to comment on this ticket.

Metadata