[ruby/ruby-2.0] Create the .%{gem_dir} and allow to override gem installation dir.

Vít Ondruch vondruch at fedoraproject.org
Tue Feb 19 13:24:14 UTC 2013


commit d5cde5c082f79d42e3d0b9810d37bd37ffd37430
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Tue Feb 19 13:46:31 2013 +0100

    Create the .%{gem_dir} and allow to override gem installation dir.

 ruby.spec |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/ruby.spec b/ruby.spec
index cb13286..d14271a 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -445,17 +445,20 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF
 %%gem_docdir %%{gem_dir}/doc/%%{gem_name}-%%{version}
 
 # Install gem into appropriate directory.
-# -n<name>      Allows to override gem for installation.
-%%gem_install(n:) \
+# -n<gem_file>      Overrides gem file name for installation.
+# -d<install_dir>   Set installation directory.
+%%gem_install(d:n:) \
+mkdir -p '%%{-d*}%%{!?-d:.%{gem_dir}}' \
+\
 CONFIGURE_ARGS="--with-cflags='%%{optflags}' $CONFIGURE_ARGS" \\\
 gem install \\\
         -V \\\
         --local \\\
-        --install-dir .%{gem_dir} \\\
+        --install-dir '%%{-d*}%%{!?-d:.%{gem_dir}}' \\\
         --bindir .%{_bindir} \\\
         --force \\\
         --document=ri,rdoc \\\
-        %%{-n*}%%{!?-n:%{gem_name}-%{version}.gem}
+        '%%{-n*}%%{!?-n:%{gem_name}-%{version}.gem}'
 EOF
 
 # Install custom operating_system.rb.


More information about the scm-commits mailing list