[packages/rpm-build-macros] 1.696 add %ruby_abi macro

glen glen at pld-linux.org
Mon Aug 4 16:43:56 CEST 2014


commit d7df0780bcb7569ffc287a5cacaf9d135c7706c0
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Aug 4 17:41:29 2014 +0300

    1.696 add %ruby_abi macro

 rpm-build-macros.spec | 2 +-
 rpm.macros            | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index 9493c78..7a83f84 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	1.695
+%define		rpm_macros_rev	1.696
 %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 452ca97..27d1262 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -929,6 +929,10 @@ fi; \
 # Ruby
 %__ruby				/usr/bin/ruby
 
+# Ruby ABI version
+# NOTE: %ruby_version may be empty, depending how Ruby was built
+%ruby_abi			%{expand:%%global ruby_abi %(%{__ruby} -r rbconfig -e 'print [RbConfig::CONFIG["MAJOR"], RbConfig::CONFIG["MINOR"]].join(".")' 2>/dev/null || echo ERROR)}%ruby_abi
+
 # 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)
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list