%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} %global gem_name rspec-support %global mainver 3.5.0 %undefine prever %global mainrel 3 %global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g') %global need_bootstrap_set 0 Name: %{?scl_prefix}rubygem-%{gem_name} Version: %{mainver} Release: %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}%{?dist} Summary: Common functionality to Rspec series Group: Development/Languages License: MIT URL: https://github.com/rspec/rspec-support Source0: https://rubygems.org/gems/%{gem_name}-%{mainver}%{?prever}.gem # %%{SOURCE2} %%{pkg_name} %%{version} Source1: rubygem-%{gem_name}-%{version}-full.tar.gz Source2: rspec-related-create-full-tarball.sh # tweak regex for search path Patch0: rubygem-rspec-support-3.2.1-callerfilter-searchpath-regex.patch # Fix for Ruby 2.4.0 compatiblity. # https://github.com/rspec/rspec-support/commit/725fc24 Patch1: rubygem-rspec-support-3.6.0.beta2-fix-for-ruby-2.4.0.patch Patch2: rubygem-rspec-support-3.6.0.beta2-fix-for-ruby-2.4.0-tests.patch Requires: %{?scl_prefix_ruby}ruby(rubygems) Requires: %{?scl_prefix_ruby}rubygem(bigdecimal) BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}rubygems-devel %if 0%{?need_bootstrap_set} < 1 BuildRequires: %{?scl_prefix}rubygem(rspec) BuildRequires: %{?scl_prefix}rubygem(thread_order) BuildRequires: %{?scl_prefix_ruby}rubygem(bigdecimal) BuildRequires: git %endif BuildArch: noarch # Need fix Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}-%{release} # Explicitly require runtime subpackage, as long as older scl-utils do not generate it %{?scl:Requires: %{?scl_prefix}runtime} %description `RSpec::Support` provides common functionality to `RSpec::Core`, `RSpec::Expectations` and `RSpec::Mocks`. It is considered suitable for internal use only at this time. %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{pkg_name} %global version_orig %{version} %global version %{version_orig}%{?prever} %prep %setup -q -T -n %{gem_name}-%{version} -b 1 %{?scl:scl enable %{scl} - << \EOF} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %{?scl:EOF} %patch0 -p1 %patch1 -p1 %patch2 -p1 %build %{?scl:scl enable %{scl} - << \EOF} set -e gem build %{gem_name}.gemspec %gem_install %{?scl:EOF} %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check %if 0%{?need_bootstrap_set} < 1 LANG=en_US.UTF-8 FAILFILE=() FAILTEST=() for ((i = 0; i < ${#FAILFILE[@]}; i++)) { sed -i \ -e "\@${FAILTEST[$i]}@s|do$|, :broken => true do|" \ ${FAILFILE[$i]} } %{?scl:scl enable %{scl} - << \EOF} ruby -rubygems -Ilib/ -S rspec spec/ || \ ruby -rubygems -Ilib/ -S rspec --tag ~broken %{?scl:EOF} %endif %files # There is no %%license macro on RHEL6. # https://bugzilla.redhat.com/show_bug.cgi?id=1386246 %{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %license %{gem_instdir}/LICENSE.md %doc %{gem_instdir}/Changelog.md %doc %{gem_instdir}/README.md %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Tue Feb 21 2017 Jun Aruga - 3.5.0-3 - Always use full tar.gz for installed files and keep using gem file for gem spec (ref: bug 1425220) * Fri Feb 03 2017 Jun Aruga - 3.5.0-2 - Fix for Ruby 2.4.0 compatibility. * Wed Nov 02 2016 Jun Aruga - 3.5.0-1 - 3.5.0 * Wed Feb 24 2016 Pavel Valena - 3.4.1-4 - Add scl macros * Thu Feb 04 2016 Fedora Release Engineering - 3.4.1-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Dec 8 2015 Mamoru TASAKA - 3.4.1-2 - Enable tests again * Tue Dec 8 2015 Mamoru TASAKA - 3.4.1-1 - 3.4.1 - Once disable tests * Sun Aug 2 2015 Mamoru TASAKA - 3.3.0-2 - Enable tests again * Sun Aug 2 2015 Mamoru TASAKA - 3.3.0-1 - 3.3.0 - Once disable tests * Thu Jun 18 2015 Fedora Release Engineering - 3.2.2-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Feb 25 2015 Mamoru TASAKA - 3.2.2-1 - 3.2.2 * Mon Feb 9 2015 Mamoru TASAKA - 3.2.1-2 - Enable tests again * Mon Feb 9 2015 Mamoru TASAKA - 3.2.1-1 - 3.2.1 - Once disable tests * Mon Nov 10 2014 Mamoru TASAKA - 3.1.2-3 - Enable tests again * Mon Nov 10 2014 Mamoru TASAKA - 3.1.2-2 - Retry * Mon Nov 10 2014 Mamoru TASAKA - 3.1.2-1 - 3.1.2 - Once disable tests * Fri Aug 15 2014 Mamoru TASAKA - 3.0.4-1 - 3.0.4 * Thu Aug 14 2014 Mamoru TASAKA - 3.0.3-1 - 3.0.3 * Sun Jun 08 2014 Fedora Release Engineering - 3.0.0-0.4.beta2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue Mar 18 2014 Mamoru TASAKA - 3.0.0-0.4.beta1 - 3.0.0 beta 2 * Mon Feb 10 2014 Mamoru TASAKA - 3.0.0-0.2.beta1 - Modify Provides EVR * Mon Feb 03 2014 Mamoru TASAKA - 3.0.0-0.1.beta1 - Initial package