From bb479d9770cd83c318da6dbe1c91c42d7735f0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 19 Feb 2013 13:46:31 +0100 Subject: [PATCH] Create the .%{gem_dir} and allow to override gem installation dir. --- ruby.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2a698b4..1468412 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 Allows to override gem for installation. -%%gem_install(n:) \ +# -n Overrides gem file name for installation. +# -d 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.