[Bug 786636] Review Request: rubygem-unicorn - Rack HTTP server for fast clients and Unix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=786636

Ken Dreyer <ktdreyer@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktdreyer@xxxxxxxxxxxx

--- Comment #6 from Ken Dreyer <ktdreyer@xxxxxxxxxxxx> ---
Thank you for carrying on this review. I'll need Unicorn for Gitorious.

Unfortunately, Ruby on RHEL 6 does not load binary gems from (what is defined
on Fedora as) %{gem_extdir}, so we have to use %{ruby_sitearch} instead. Here's
what I use for RHEL 6 compatibility in my arch-specific rubygem packages.

At the top, I have a list of macros like you have, and I add ruby_sitearch to
the bottom of the list:

%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts
Config::CONFIG["sitearchdir"]')}

Then, in %install, instead of copying the shared lib to gem_extdir, I use a
dist tag conditional:

%if 0%{?el6}
# gem_extdir doesn't really work on EL 6
mkdir -p %{buildroot}%{ruby_sitearch}
# move the extension to ruby_sitearch
mv %{buildroot}%{gem_libdir}/unicorn_http.so %{buildroot}%{ruby_sitearch}
%else
mkdir -p %{buildroot}%{gem_extdir}/lib
# move the extension to gem_extdir
mv %{buildroot}%{gem_libdir}/unicorn_http.so %{buildroot}%{gem_extdir}/lib/
%endif

And lastly, in %files, I use a second dist tag conditional:

%if 0%{?el6}
%{ruby_sitearch}/unicorn_http.so
%else
%{gem_extdir}
%endif

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=qkJTtNlcRl&a=cc_unsubscribe
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review



[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]