%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} %global gem_name gherkin # %%check section needs cucumber, however cucumber depends on gherkin. %{!?need_bootstrap: %global need_bootstrap 0} Summary: Fast Gherkin lexer/parser Name: %{?scl_prefix}rubygem-%{gem_name} Version: 3.2.0 Release: 3%{?dist} Group: Development/Languages License: MIT URL: http://github.com/cucumber/gherkin Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone https://github.com/cucumber/gherkin.git && cd gherkin # git checkout v3.2.0 && tar czvf gherkin-3.2.0-testdata.tgz testdata/ Source1: gherkin-3.2.0-testdata.tgz Requires: %{?scl_prefix_ruby}ruby(release) Requires: %{?scl_prefix_ruby}ruby(rubygems) BuildRequires: %{?scl_prefix_ruby}ruby(rubygems) BuildRequires: %{?scl_prefix_ruby}rubygems-devel BuildRequires: %{?scl_prefix_ruby}ruby-devel BuildRequires: %{?scl_prefix}rubygem(rspec) 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} %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires:%{?scl_prefix}%{pkg_name} = %{version}-%{release} %description doc Documentation for %{pkg_name} %description A fast Gherkin lexer/parser based on the Ragel State Machine Compiler. %prep %setup -n %{pkg_name}-%{version} -q -c -T %{?scl:scl enable %{scl} - << \EOF} %gem_install -n %{SOURCE0} %{?scl:EOF} %build %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ # Drop the executable bit. # https://github.com/cucumber/gherkin/pull/167 chmod a-x %{buildroot}%{gem_instdir}/gherkin-ruby.razor %check %if 0%{?need_bootstrap} < 1 %{?scl:scl enable %{scl} - << \EOF} set -e pushd .%{gem_instdir} LANG=C.UTF-8 rspec spec # Execute acceptance tests. pushd .. tar xzvf %{SOURCE1} popd # Comment out the rspec tests on bundle. sed -i '/.built:/ i .built:\n' Makefile sed -i '/.built: /,/^$/ s/^/#/' Makefile # Comment out the the tests with jq because we do not ship the jq package. sed -i '/^.compared: / s/^/#/' Makefile sed -i '/^#.compared:/ a .compared: $(TOKENS) $(ERRORS)' Makefile # bin/gherkin-generate-tokens:7 sed -i '/STDIN/ s/ +.*)//' bin/* LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 make popd %{?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} %exclude %{gem_instdir}/.* %license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CONTRIBUTING.md %{gem_instdir}/Gemfile %{gem_instdir}/Makefile %doc %{gem_instdir}/README.md %{gem_instdir}/Rakefile %{gem_instdir}/gherkin.gemspec %{gem_instdir}/gherkin-ruby.razor %{gem_instdir}/spec %changelog * Mon Jan 09 2017 Jun Aruga - 3.2.0-3 - Update to 3.2.0 * Wed Apr 06 2016 Pavel Valena - 2.12.2-9 - Enable tests - Add rubygem-builder to BR - Add rubygem-multi_test to BR * Thu Feb 25 2016 Pavel Valena - 2.12.2-8 - Add scl macros * Thu Feb 04 2016 Fedora Release Engineering - 2.12.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jan 13 2016 Mamoru TASAKA - 2.12.2-6 - F-24: rebuild against ruby23 - Bootstrap, once disable test * Thu Jun 18 2015 Fedora Release Engineering - 2.12.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Jan 16 2015 Mamoru TASAKA - 2.12.2-4 - Enable test suite again * Thu Jan 15 2015 Mamoru TASAKA - 2.12.2-3 - Rebuild for ruby 2.2 - Bootstrap, once disable test * Mon Aug 18 2014 Fedora Release Engineering - 2.12.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Thu Jun 19 2014 Josef Stribny - 2.12.2-1 - Update to gherkin 2.12.2 * Sun Jun 08 2014 Fedora Release Engineering - 2.11.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Apr 14 2014 Vít Ondruch - 2.11.6-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 * Tue Aug 6 2013 Mamoru TASAKA - 2.11.6-5 - Again enable test suite * Tue Aug 6 2013 Mamoru TASAKA - 2.11.6-4 - Bootstrap * Sun Aug 04 2013 Fedora Release Engineering - 2.11.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Feb 20 2013 Vít Ondruch - 2.11.6-2 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 - Add bootstrap code. * Mon Feb 18 2013 Bohuslav Kabrda - 2.11.6-1 - Updated to version 2.11.6. - Fixed wrong dates in changelog. * Thu Feb 14 2013 Fedora Release Engineering - 2.9.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 2.9.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Mar 29 2012 Bohuslav Kabrda - 2.9.3-1 - Update to 2.9.3 - Introduced %%check section * Mon Jan 23 2012 Bohuslav Kabrda - 2.4.5-4 - Removed *.so files from %%{gem_libdir}. * Mon Jan 23 2012 Bohuslav Kabrda - 2.4.5-3 - Rebuilt for Ruby 1.9.3. - Significantly simplified build process. * Sat Jan 14 2012 Fedora Release Engineering - 2.4.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Jul 12 2011 Mo Morsi - 2.4.5-1 - Update to latest upstream release * Wed Jun 08 2011 Chris Lalancette - 2.3.3-3 - Significantly revamped spec to conform more to fedora standards - Fix build on Rawhide * Wed Feb 09 2011 Fedora Release Engineering - 2.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Fri Feb 04 2011 Michal Fojtik - 2.3.3-1 - Version bump * Fri Sep 24 2010 Michal Fojtik - 2.2.4-3 - Replaced ~> with >= in JSON version so now it can be used with latest json as well * Fri Sep 24 2010 Michal Fojtik - 2.2.4-2 - Fixed JSON dependency version * Fri Sep 24 2010 Michal Fojtik - 2.2.4-1 - Version bump * Wed Sep 08 2010 Michal Fojtik - 2.2.0-1 - Version bump * Tue Jul 20 2010 Michal Fojtik - 2.1.5-3 - Fixed rspec and trollop versions in gemspec files * Tue Jul 20 2010 Michal Fojtik - 2.1.5-2 - Added -doc subpackage - Fixed debugging symbols issue (Thanks mtasaka) - Fixed path for pushd in install section - Fixed trollop version in gemspec - Removed '#line foo' from C files * Mon Jul 19 2010 Michal Fojtik - 2.1.5-1 - Updated to latest version - Fixed compiler flags - Fixed directory ownership - Removed unwanted versioning files - Placed .so files on right place * Wed Jul 14 2010 Michal Fojtik - 2.1.3-1 - Initial package