]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
%ruby_gemdir: use value from Gem itself, 1.9/2.0 compatible packaging
authorElan Ruusamäe <glen@delfi.ee>
Sat, 31 May 2014 16:49:16 +0000 (19:49 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 31 May 2014 16:49:33 +0000 (19:49 +0300)
rpm.macros

index 68441a24747bea42248bd83ec982b574526f6b19..bd6d04239165c4b684ac6a9e4b41c4d09a810485 100644 (file)
@@ -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
This page took 0.0509269999999999 seconds and 4 git commands to generate.