[ruby] Introduce %gem_install macro.
Vít Ondruch
vondruch at fedoraproject.org
Fri Feb 22 14:25:58 UTC 2013
commit 2ec8c6e8c95a254c4b7bd7aef4f415efad6d2fe7
Author: Vít Ondruch <vondruch at redhat.com>
Date: Tue Feb 19 10:13:20 2013 +0100
Introduce %gem_install macro.
ruby.spec | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/ruby.spec b/ruby.spec
index 706493b..2a698b4 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -443,6 +443,19 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF
%%gem_cache %%{gem_dir}/cache/%%{gem_name}-%%{version}.gem
%%gem_spec %%{gem_dir}/specifications/%%{gem_name}-%%{version}.gemspec
%%gem_docdir %%{gem_dir}/doc/%%{gem_name}-%%{version}
+
+# Install gem into appropriate directory.
+# -n<name> Allows to override gem for installation.
+%%gem_install(n:) \
+CONFIGURE_ARGS="--with-cflags='%%{optflags}' $CONFIGURE_ARGS" \\\
+gem install \\\
+ -V \\\
+ --local \\\
+ --install-dir .%{gem_dir} \\\
+ --bindir .%{_bindir} \\\
+ --force \\\
+ --document=ri,rdoc \\\
+ %%{-n*}%%{!?-n:%{gem_name}-%{version}.gem}
EOF
# Install custom operating_system.rb.
More information about the scm-commits
mailing list