%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} # Generated from cucumber-core-1.4.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name cucumber-core Name: %{?scl_prefix}rubygem-%{gem_name} Version: 1.4.0 Release: 4%{?dist} Summary: Core library for the Cucumber BDD app Group: Development/Languages License: MIT URL: http://cukes.info Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: %{?scl_prefix_ruby}ruby(release) Requires: %{?scl_prefix_ruby}ruby(rubygems) Requires: %{?scl_prefix}rubygem(gherkin) BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}ruby(rubygems) BuildRequires: %{?scl_prefix_ruby}ruby BuildRequires: %{?scl_prefix_ruby}rubygems-devel BuildRequires: %{?scl_prefix}rubygem(gherkin) BuildRequires: %{?scl_prefix}rubygem(rspec) # BuildRequires: %{?scl_prefix}rubygem(unindent) BuildArch: noarch Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} # Explicitly require runtime subpackage, as long as older scl-utils do not generate it %{?scl:Requires: %{?scl_prefix}runtime} %description Core library for the Cucumber BDD app. %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{pkg_name}. %prep %{?scl:scl enable %{scl} - << \EOF} set -e gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -e gem build %{gem_name}.gemspec %gem_install %{?scl:EOF} %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} # unindent is not available in Fedora => avoid the requires. for file in $(grep -Rl unindent spec); do sed -i "/require 'unindent'/ s/^/#/" "${file}" sed -i '/^ *expect.*unindent$/ i \pending' "${file}" done sed -i '/^ *expect_tag_excess/ i \pending' \ spec/cucumber/core_spec.rb # We do not ship kramdown on SCL. mv spec/readme_spec.rb{,.disabled} %{?scl:scl enable %{scl} - << \EOF} set -e LANG=C.UTF-8 rspec spec %{?scl:EOF} popd %files # There is no %%license macro on RHEL6. # https://bugzilla.redhat.com/show_bug.cgi?id=1386246 %{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %exclude %{gem_instdir}/.* %license %{gem_instdir}/LICENSE %{gem_libdir} # This is not the original file => makes no sense to ship it. %exclude %{gem_instdir}/cucumber-core.gemspec %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CONTRIBUTING.md %{gem_instdir}/Gemfile %doc %{gem_instdir}/HISTORY.md %doc %{gem_instdir}/README.md %{gem_instdir}/Rakefile %{gem_instdir}/spec %changelog * Fri Feb 03 2017 Jun Aruga - 1.4.0-4 - Improve tests. * Mon Jan 09 2017 Jun Aruga - 1.4.0-3 - Initial package