From: Elan Ruusamäe Date: Thu, 20 Jun 2013 20:49:59 +0000 (+0300) Subject: 1.665: added ruby_specdir, memoize ruby_gemdir X-Git-Tag: auto/th/rpm-build-macros-1.665-1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=7b5300da25d036273a4b83a8857b72f1d4534e87;p=packages%2Frpm-pld-macros.git 1.665: added ruby_specdir, memoize ruby_gemdir ruby_gemdir is defined also in macros.d/ruby in case of rpm5 which we override --- diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec index 2c34b91..3f37d3f 100644 --- a/rpm-build-macros.spec +++ b/rpm-build-macros.spec @@ -5,7 +5,7 @@ %if "%{pld_release}" == "ac" %define with_rpm4 1 %endif -%define rpm_macros_rev 1.664 +%define rpm_macros_rev 1.665 %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 3ccc0e2..e435d6d 100644 --- a/rpm.macros +++ b/rpm.macros @@ -917,6 +917,10 @@ fi; \ %ruby_vendordir %{expand:%%global ruby_vendordir %(%{__ruby} -r rbconfig -e 'print RbConfig::CONFIG["vendordir"]' 2>/dev/null || echo ERROR)}%ruby_vendordir %ruby_version %{expand:%%global ruby_version %(%{__ruby} -r rbconfig -e 'print RbConfig::CONFIG["ruby_version"]' 2>/dev/null || echo ERROR)}%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_specdir %{ruby_gemdir}/specifications + +# deprecated, similar functionality autogenerated with rpm5 %ruby_ver_requires_eq Requires: ruby(ver) = %ruby_version %ruby_mod_ver_requires_eq Requires: ruby-modules(ver) = %ruby_version