From e8d85f01b57222d4f4e45aabd081a1220e9b497e Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Sat, 16 Feb 2013 23:02:01 -0700 Subject: RHEL 6 compatibility --- rubygem-typhoeus.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'rubygem-typhoeus.spec') diff --git a/rubygem-typhoeus.spec b/rubygem-typhoeus.spec index 3c87c0e..c490979 100644 --- a/rubygem-typhoeus.spec +++ b/rubygem-typhoeus.spec @@ -1,11 +1,15 @@ %global gem_name typhoeus +%if 0%{?el6} +%global rubyabi 1.8 +%else %global rubyabi 1.9.1 +%endif Summary: A library for interacting with web services at blinding speed Name: rubygem-%{gem_name} Version: 0.3.3 -Release: 4%{?dist} +Release: 5%{?dist} Group: Development/Languages License: MIT URL: http://github.com/pauldix/typhoeus @@ -14,7 +18,11 @@ Requires: ruby(rubygems) Requires: ruby(abi) = %{rubyabi} Requires: rubygem(mime-types) BuildRequires: ruby(abi) = %{rubyabi} +%if 0%{?fedora} BuildRequires: rubygems-devel +%else +BuildRequires: ruby(rubygems) +%endif # Use rspec-core until rspec are not migrated to RSpec 2.x BuildRequires: rubygem(rspec-core) BuildRequires: rubygem(json) @@ -24,6 +32,18 @@ BuildRequires: ruby-devel BuildRequires: libcurl-devel Provides: rubygem(%{gem_name}) = %{version} +# macros for RHEL6 compatibility: +%{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)} +%{!?gem_instdir: %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}} +%{!?gem_libdir: %global gem_libdir %{gem_instdir}/lib} +%{!?gem_cache: %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem} +%{!?gem_spec: %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec} +%{!?gem_docdir: %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}} +%{!?gem_extdir: %global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}} +%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')} +%{!?ruby_vendorarchdir: %global ruby_vendorarchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"] ')} + + %description Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling @@ -90,6 +110,9 @@ popd %doc %{gem_docdir} %changelog +* Wed Feb 06 2013 Ken Dreyer - 0.3.3-5 +- RHEL 6 compatibility + * Sat Jul 21 2012 Fedora Release Engineering - 0.3.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild -- cgit