]> git.pld-linux.org Git - packages/rpm-pld-macros.git/commitdiff
- macros 1.754: added ruby_arch and ruby_rubyhdrdir macros
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 21 Nov 2020 15:57:50 +0000 (16:57 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 21 Nov 2020 15:57:50 +0000 (16:57 +0100)
macros.ruby
rpm-pld-macros.spec

index e0d309a669fb04c59529a9d9cab87f7c574733c2..5289c12117b7e4dc3b0bf4a752688cbc3edabc8e 100644 (file)
@@ -2,18 +2,21 @@
 
 %__ruby                        /usr/bin/ruby
 
+# helpers to 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 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)
+# Ruby arch combo (CPU-OS, e.g. i686-linux)
+%ruby_arch             %{expand:%%global ruby_arch %{__ruby_rbconfig arch}}%ruby_arch
 
 %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", "system")' 2>/dev/null || echo ERROR)}%ruby_ridir
 %ruby_rubylibdir       %{expand:%%global ruby_rubylibdir %{__ruby_rbconfig_path rubylibdir}}%ruby_rubylibdir
+%ruby_rubyhdrdir       %{expand:%%global ruby_rubyhdrdir %{__ruby_rbconfig_path rubyhdrdir}}%ruby_rubyhdrdir
 %ruby_vendorarchdir    %{expand:%%global ruby_vendorarchdir %{__ruby_rbconfig vendorarchdir}}%ruby_vendorarchdir
 %ruby_vendorlibdir     %{expand:%%global ruby_vendorlibdir %{__ruby_rbconfig_path vendorlibdir}}%ruby_vendorlibdir
 %ruby_sitearchdir      %{expand:%%global ruby_sitearchdir %{__ruby_rbconfig sitearchdir}}%ruby_sitearchdir
index 282f173050f8dd24bf3e3449f991870977713395..976f50ee90c6202960ba0574599435a2bc0ec365 100644 (file)
@@ -1,4 +1,4 @@
-%define                rpm_macros_rev  1.753
+%define                rpm_macros_rev  1.754
 %define                find_lang_rev   1.40
 # split into individual X_prov_ver if there is a reason to desync
 %define                prov_ver        4.15
This page took 0.533803 seconds and 4 git commands to generate.