[packages/rpm-build-macros] 1.695: ruby 2.0 compatible macros

glen glen at pld-linux.org
Thu Jul 17 21:47:58 CEST 2014


commit ff7766ed9e0311a9625d1aa5e55037fde28dffda
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jul 17 22:47:29 2014 +0300

    1.695: ruby 2.0 compatible macros
    
    i knew i forgot something!

 rpm-build-macros.spec |  2 +-
 rpm.macros            | 11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index 03c11b9..9493c78 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	1.694
+%define		rpm_macros_rev	1.695
 %define		find_lang_rev	1.36
 Summary:	PLD Linux RPM build macros
 Summary(pl.UTF-8):	Makra do budowania pakietów RPM dla Linuksa PLD
diff --git a/rpm.macros b/rpm.macros
index 725cb0a..452ca97 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -931,19 +931,20 @@ fi; \
 
 # get rbconfig parameter
 %__ruby_rbconfig()	%(%{__ruby} -r rbconfig -e 'print RbConfig::CONFIG["%1"]' 2>/dev/null || echo ERROR)
+%__ruby_rbconfig_path()	%(%{__ruby} -r rbconfig -r pathname -e 'print Pathname(RbConfig::CONFIG["%1"]).cleanpath' 2>/dev/null || echo ERROR)
 
-%ruby_archdir		%{expand:%%global ruby_archdir %{__ruby_rbconfig archdir}}%ruby_archdir
+%ruby_archdir		%{expand:%%global ruby_archdir %{__ruby_rbconfig_path archdir}}%ruby_archdir
 %ruby_libdir		%{expand:%%global ruby_libdir %{__ruby_rbconfig rubylibdir}}%ruby_libdir
 %ruby_ridir			%{expand:%%global ruby_ridir %(%{__ruby} -r rbconfig -e 'print File.join(RbConfig::CONFIG["datadir"], "ri", RbConfig::CONFIG["ruby_version"], "system")' 2>/dev/null || echo ERROR)}%ruby_ridir
-%ruby_rubylibdir	%{expand:%%global ruby_rubylibdir %{__ruby_rbconfig rubylibdir}}%ruby_rubylibdir
+%ruby_rubylibdir	%{expand:%%global ruby_rubylibdir %{__ruby_rbconfig_path rubylibdir}}%ruby_rubylibdir
 %ruby_vendorarchdir	%{expand:%%global ruby_vendorarchdir %{__ruby_rbconfig vendorarchdir}}%ruby_vendorarchdir
-%ruby_vendorlibdir	%{expand:%%global ruby_vendorlibdir %{__ruby_rbconfig vendorlibdir}}%ruby_vendorlibdir
+%ruby_vendorlibdir	%{expand:%%global ruby_vendorlibdir %{__ruby_rbconfig_path vendorlibdir}}%ruby_vendorlibdir
 %ruby_sitearchdir	%{expand:%%global ruby_sitearchdir %{__ruby_rbconfig sitearchdir}}%ruby_sitearchdir
 %ruby_sitedir		%{expand:%%global ruby_sitedir %{__ruby_rbconfig sitedir}}%ruby_sitedir
-%ruby_sitelibdir	%{expand:%%global ruby_sitelibdir %{__ruby_rbconfig sitelibdir}}%ruby_sitelibdir
+%ruby_sitelibdir	%{expand:%%global ruby_sitelibdir %{__ruby_rbconfig_path sitelibdir}}%ruby_sitelibdir
 %ruby_rdocdir		/usr/share/rdoc
 %ruby_vendordir		%{expand:%%global ruby_vendordir %{__ruby_rbconfig vendordir}}%ruby_vendordir
-%ruby_version		%{expand:%%global ruby_version %{__ruby_rbconfig ruby_version}}%ruby_version
+%ruby_version		%{expand:%%global ruby_version %(r=%{__ruby_rbconfig ruby_version}; echo ${r:-%%nil})}%ruby_version
 
 %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
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list