%if 0%{?el6} %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]') %endif # Generated from curb-0.7.7.1.gem by gem2rpm -*- rpm-spec -*- %global gem_name curb Summary: Ruby libcurl bindings Name: rubygem-%{gem_name} Version: 0.8.4 Release: 2%{?dist} Group: Development/Languages License: Ruby URL: http://curb.rubyforge.org/ Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem Patch0: curb-disable-network-lookup-test.patch %if 0%{?el6} Requires: ruby(abi) = 1.8 %else Requires: ruby(release) %endif Requires: ruby(rubygems) %if 0%{?el6} BuildRequires: ruby(abi) = 1.8 %else BuildRequires: ruby(release) %endif BuildRequires: rubygems-devel BuildRequires: rubygem(minitest) BuildRequires: ruby-devel BuildRequires: libcurl-devel Provides: rubygem(%{gem_name}) = %{version} %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description doc Documentation for %{name} %description Curb (probably CUrl-RuBy or something) provides Ruby-language bindings for the libcurl(3), a fully-featured client-side URL transfer library. cURL and libcurl live at http://curl.haxx.se/ %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # Disable due to Curl::Err::HostResolutionError, which is cause probably by # missing network access on Koji. %patch0 -p1 %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %if 0%{?el6} mkdir -p %{buildroot}%{ruby_sitearch} mv %{buildroot}%{gem_instdir}/lib/curb_core.so %{buildroot}/%{ruby_sitearch}/curb_core.so %else mkdir -p %{buildroot}%{gem_extdir_mri}/lib mv %{buildroot}%{gem_instdir}/lib/curb_core.so %{buildroot}%{gem_extdir_mri}/lib/ %endif %check %if ! 0%{?el6} pushd .%{gem_instdir} testrb tests/tc_*.rb popd %endif %files %dir %{gem_instdir} %{gem_libdir} %exclude %{gem_instdir}/ext %exclude %{gem_instdir}/tests %exclude %{gem_instdir}/Rakefile %exclude %{gem_instdir}/doc.rb %if 0%{?el6} %exclude %{gem_instdir}/.require_paths %endif %if 0%{?el6} %{ruby_sitearch}/curb_core.so %else %{gem_extdir_mri} %endif %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/LICENSE %doc %{gem_instdir}/README %changelog * Wed Apr 9 2014 Steve Traylen - 0.8.4-2 - Now really works on EPEL6. * Tue Mar 11 2014 Steve Traylen - 0.8.4-1 - Update to curb 0.8.4, fix to latest ruby guidelines. * Sun Aug 04 2013 Fedora Release Engineering - 0.8.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Mar 08 2013 Vít Ondruch - 0.8.3-3 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Thu Feb 14 2013 Fedora Release Engineering - 0.8.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Nov 20 2012 Vít Ondruch - 0.8.3-1 - Update to curb 0.8.3. * Sat Jul 21 2012 Fedora Release Engineering - 0.7.10-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Feb 01 2012 Vít Ondruch - 0.7.10-4 - Rebuilt for Ruby 1.9.3. * Sat Jan 14 2012 Fedora Release Engineering - 0.7.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Fri Feb 25 2011 Shreyank Gupta - 0.7.10-2 - not excluding .require_paths * Fri Feb 25 2011 Shreyank Gupta - 0.7.10-1 - New upstream 0.7.10 * Wed Jul 21 2010 Shreyank Gupta - 0.7.7.1-4 - Remove unneeded .require_paths file * Tue Jul 20 2010 Shreyank Gupta - 0.7.7.1-3 - Remove unneeded .o and .so files from ext/ directory - No rake test for ppc64 * Mon Jul 19 2010 Shreyank Gupta - 0.7.7.1-2 - Install gem file under %%gemdir and then copy to %%buildroot - Moving .so to %%ruby_sitearch - BuildRequires: rubygem(rake) * Fri Jul 02 2010 Shreyank Gupta - 0.7.7.1-1 - Initial package