[packages/rpm-build-macros] %ruby_gemdir: use value from Gem itself, 1.9/2.0 compatible packaging

glen glen at pld-linux.org
Sat May 31 18:49:42 CEST 2014


commit 5af2fd898afa5df3ff100e71f856279a17df1794
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 31 19:49:16 2014 +0300

    %ruby_gemdir: use value from Gem itself, 1.9/2.0 compatible packaging

 rpm.macros | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rpm.macros b/rpm.macros
index 68441a2..bd6d042 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -940,7 +940,7 @@ fi; \
 %ruby_vendordir		%{expand:%%global ruby_vendordir %{__ruby_rbconfig vendordir}}%ruby_vendordir
 %ruby_version		%{expand:%%global ruby_version %{__ruby_rbconfig ruby_version}}%ruby_version
 
-%ruby_gemdir		%{expand:%%global ruby_gemdir %(%{__ruby} -r rbconfig -e 'print RbConfig::CONFIG["rubylibdir"].sub(RbConfig::CONFIG["ruby_version"], "gems/#{RbConfig::CONFIG["ruby_version"]}")' 2>/dev/null || echo ERROR)}%{ruby_gemdir}
+%ruby_gemdir		%{expand:%%global ruby_gemdir %(%{__ruby} -r rubygems -e 'puts Gem.respond_to?(:default_dirs) ? Gem.default_dirs[:system][:gem_dir] : Gem.path.first' 2>/dev/null || echo ERROR)}%{ruby_gemdir}
 %ruby_specdir		%{ruby_gemdir}/specifications
 
 # deprecated, similar functionality autogenerated with rpm5
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/5af2fd898afa5df3ff100e71f856279a17df1794



More information about the pld-cvs-commit mailing list