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

This commit is contained in:
Vít Ondruch 2013-02-19 13:46:31 +01:00
parent 2ec8c6e8c9
commit bb479d9770

View File

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