[rubygem-rr/f19] fixes for ruby 2.0.0

Guillermo Gómez gomix at fedoraproject.org
Sun Mar 24 13:55:32 UTC 2013


commit 0d14c42eeed178144f3e202a86d839192a4c3512
Author: Guillermo Gómez <gomix at fedoraproject.org>
Date:   Sun Mar 24 09:25:22 2013 -0430

    fixes for ruby 2.0.0

 rubygem-rr.spec |   47 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 44 insertions(+), 3 deletions(-)
---
diff --git a/rubygem-rr.spec b/rubygem-rr.spec
index e1a2c46..2727ceb 100644
--- a/rubygem-rr.spec
+++ b/rubygem-rr.spec
@@ -1,16 +1,36 @@
 %global gem_name rr
 
+%global rubyabi 1.9.1
+  
+%if 0%{?fedora} >= 17
+  %global rubyabi 1.9.1
+%endif
+
+%if 0%{?fedora} >= 19
+  %global rubyabi 2.0.0
+%endif
+
 Summary: RR (Double Ruby) is a test double framework 
 Name: rubygem-%{gem_name}
 Version: 1.0.4
-Release: 8%{?dist}
+Release: 9%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://pivotallabs.com
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
-Requires: ruby(release)
+
+%if 0%{?fedora} >= 19
+Requires:       ruby(release)
+%endif
+
+%if 0%{?fedora} >= 17 && 0%{?fedora} < 19
+Requires:      ruby(abi) = %{rubyabi}
+%endif
+
+%if 0%{?fedora} <= 17
 Requires: ruby(rubygems) 
-BuildRequires: ruby(release)
+%endif
+
 BuildRequires: ruby-irb
 BuildRequires: rubygems-devel
 BuildArch: noarch
@@ -54,7 +74,24 @@ mkdir -p .%{gem_dir}
 # Create the gem as gem install only works on a gem file
 gem build %{gem_name}.gemspec
 
+export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+# gem install compiles any C extensions and installs into a directory
+# We set that to be a local directory so that we can move it into the
+# buildroot in %%install
+%if 0%{?fedora} >= 17 && 0%{?fedora} <= 18
+gem install -V \
+        --local \
+        --install-dir ./%{gem_dir} \
+        --bindir ./%{_bindir} \
+        --force \
+        --rdoc \
+        --ri \
+        %{gem_name}-%{version}.gem
+%endif
+
+%if 0%{?fedora} >= 19
 %gem_install
+%endif
 
 %install
 mkdir -p %{buildroot}%{gem_dir}
@@ -110,6 +147,10 @@ rm  %{buildroot}%{gem_instdir}/Rakefile
 %{gem_instdir}/benchmarks
 
 %changelog
+* Sun Mar 24 2013 Guillermo Gómez <guillermo.gomez at gmail.com> - 1.0.4-7
+- Removed unnecesary dependencies
+- Fixes for Ruby 2.0.0 packaging
+
 * Wed Feb 27 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 1.0.4-8
 - F-19: Rebuild for ruby 2.0.0
 


More information about the scm-commits mailing list