#%%global prerelease .rc3 %global gem_name nokogiri Summary: An HTML, XML, SAX, and Reader parser Name: rubygem-%{gem_name} Version: 1.10.7 Release: 1%{?dist} License: MIT URL: https://nokogiri.org/ Source0: https://rubygems.org/gems/%{gem_name}-%{version}%{?prerelease}.gem # Tests are not shipped with the gem, you can get them like so: # git clone --no-checkout https://github.com/sparklemotion/nokogiri # cd nokogiri && git archive -v -o nokogiri-1.10.7-tests.txz v1.10.7 test/ Source1: %{gem_name}-%{version}-tests.txz # ./test/html/test_element_description.rb:62 fails, as usual...... # Patch0: rubygem-nokogiri-1.5.0.beta3-test-failure.patch #Patch0: rubygem-nokogiri-1.5.0-allow-non-crosscompile.patch # Shut down libxml2 version unmatching warning Patch0: %{name}-1.6.6.4-shutdown-libxml2-warning.patch BuildRequires: ruby(release) BuildRequires: ruby(rubygems) ## ## For %%check BuildRequires: rubygem(minitest) BuildRequires: rubygems-devel Obsoletes: ruby-%{gem_name} <= 1.5.2-2 #BuildRequires: ruby(racc) ## ## Others BuildRequires: gcc BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: ruby-devel %description Nokogiri parses and searches XML/HTML very quickly, and also has correctly implemented CSS3 selector support as well as XPath support. Nokogiri also features an Hpricot compatibility layer to help ease the change to using correct CSS and XPath. %if 0 %package jruby Summary: JRuby support for %{name} Requires: %{name} = %{version}-%{release} %description jruby This package contains JRuby support for %{name}. %endif %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %prep %if 0%{?rhel} <= 7 gem unpack %{SOURCE0} gem specification %{SOURCE0} -l --ruby > %{gem_name}-%{version}.gemspec %endif %setup -q -D -n %{gem_name}-%{version} -b 1 # patches %patch0 -p1 # remove bundled external libraries %gemspec_remove_file Dir.glob("ports/archives/**/*") %gemspec_remove_file Dir.glob("ports/ports/**/*") # Actually not needed when using system libraries %gemspec_remove_dep -g mini_portile2 %build # 1.6.0 needs this export NOKOGIRI_USE_SYSTEM_LIBRARIES=yes LC_ALL=c.utf-8 gem build ../%{gem_name}-%{version}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir} # Remove backup file find %{buildroot} -name \*.orig_\* | xargs rm -vf # move arch dependent files to %%gem_extdir mkdir -p %{buildroot}%{gem_extdir_mri} cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/ # move bin/ files mkdir -p %{buildroot}%{_bindir} cp -pa .%{_bindir}/* \ %{buildroot}%{_bindir}/ # remove all shebang for f in $(find %{buildroot}%{gem_instdir} -name \*.rb) do sed -i -e '/^#!/d' $f chmod 0644 $f done %check pushd .%{gem_instdir} # test_exslt(TestXsltTransforms) [./test/test_xslt_transforms.rb:93] # fails without TZ on sparc export TZ="Asia/Tokyo" export LC_ALL=c.utf-8 # Link tests ln -s %{_builddir}/test . # Remove unneeded simplecov coverage test sed -i test/helper.rb \ -e '\@require.*simplecov@,\@^end$@d' %if 0%{?rhel} <= 7 # Disable failing tests due to system libraries versions discrepancy mv test/test_convert_xpath.rb{,.disable} mv test/css/test_nthiness.rb{,.disable} %endif ruby \ -I.:lib:test:ext \ -r 'test/helper' \ -e "Dir.glob('test/**/test_*.rb'){|f| require f}" popd %files %{_bindir}/%{gem_name} %{gem_extdir_mri}/ %dir %{gem_instdir}/ %{gem_instdir}/bin/ %{gem_instdir}/lib/ %{gem_dir}/specifications/%{gem_name}-%{version}%{?prerelease}.gemspec %license %{gem_instdir}/LICENSE-DEPENDENCIES.md %license %{gem_instdir}/LICENSE.md %exclude %{gem_dir}/cache/%{gem_name}-%{version}%{?prerelease}.gem %exclude %{gem_instdir}/ext/%{gem_name}/ %exclude %{gem_instdir}/.* %exclude %{gem_instdir}/dependencies.yml %exclude %{gem_instdir}/patches/ %if 0 %files jruby %{gem_instdir}/ext/java/ %endif %files doc #%%{gem_instdir}/deps.rip #%%{gem_instdir}/spec/ %{gem_dir}/doc/%{gem_name}-%{version}%{?prerelease}/ %doc %{gem_instdir}/README.md %changelog * Thu Dec 05 2019 Pavel Valena - 1.10.7-1 - Update to nokogiri 1.10.7. * Tue Nov 5 2019 Mamoru TASAKA - 1.10.5-1 - 1.10.5 * Fri Aug 16 2019 Mamoru TASAKA - 1.10.4-1 - 1.10.4 * Fri Jul 26 2019 Fedora Release Engineering - 1.10.3-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Apr 23 2019 Mamoru TASAKA - 1.10.3-1 - 1.10.3 * Tue Mar 26 2019 Mamoru TASAKA - 1.10.2-1 - 1.10.2 * Sat Feb 02 2019 Fedora Release Engineering - 1.10.1-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Jan 29 2019 Mamoru TASAKA - 1.10.1-1 - 1.10.1 * Mon Jan 21 2019 Mamoru TASAKA - 1.10.0-2 - F-30: rebuild against ruby26 * Wed Jan 9 2019 Mamoru TASAKA - 1.10.0-1 - 1.10.0 * Mon Dec 31 2018 Mamoru TASAKA - 1.9.1-1 - 1.9.1 * Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 1.8.5-1.1 - Use C.UTF-8 locale See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot * Tue Oct 9 2018 Mamoru TASAKA - 1.8.5-1 - 1.8.5 * Sat Jul 14 2018 Fedora Release Engineering - 1.8.4-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Jul 6 2018 Mamoru TASAKA - 1.8.4-1 - 1.8.4 * Mon Jun 18 2018 Mamoru TASAKA - 1.8.3-1 - 1.8.3 * Tue Feb 6 2018 Mamoru TASAKA - 1.8.2-1 - 1.8.2 * Thu Jan 25 2018 Yaakov Selkowitz - 1.8.1-1.3 - Drop compatibility with old releases * Sat Jan 20 2018 Björn Esser - 1.8.1-1.2 - Rebuilt for switch to libxcrypt * Wed Jan 03 2018 Mamoru TASAKA - 1.8.1-1.1 - F-28: rebuild for ruby25 * Wed Sep 20 2017 Mamoru TASAKA - 1.8.1-1 - 1.8.1 * Thu Aug 03 2017 Fedora Release Engineering - 1.8.0-1.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.8.0-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jun 12 2017 Mamoru TASAKA - 1.8.0-1 - 1.8.0 * Fri May 12 2017 Mamoru TASAKA - 1.7.2-1 - 1.7.2 * Tue Mar 21 2017 Mamoru TASAKA - 1.7.1-1 - 1.7.1 * Sat Feb 11 2017 Fedora Release Engineering - 1.7.0.1-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Jan 11 2017 Mamoru TASAKA - 1.7.0.1-2 - F-26: rebuild for ruby24 * Thu Jan 5 2017 Mamoru TASAKA - 1.7.0.1-1 - 1.7.0.1 * Thu Dec 29 2016 Mamoru TASAKA - 1.7.0-1 - 1.7.0 * Mon Oct 10 2016 Mamoru TASAKA - 1.6.8.1-1 - 1.6.8.1 * Fri Jul 1 2016 Mamoru TASAKA - 1.6.8-3 - Kill pkg-config runtime redundant dependency (bug 1349893) * Mon Jun 20 2016 Mamoru TASAKA - 1.6.8-2 - 1.6.8 * Thu Feb 04 2016 Fedora Release Engineering - 1.6.7.2-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jan 28 2016 Mamoru TASAKA - 1.6.7.2-1 - 1.6.7.2 * Mon Jan 11 2016 Mamoru TASAKA - 1.6.7-0.4.rc4 - F-24: rebuild against ruby23 * Fri Dec 11 2015 Mamoru TASAKA - 1.6.7-0.3.rc3 - Shutdown libxml2 version mismatch warning * Tue Dec 8 2015 Mamoru TASAKA - 1.6.7-0.2.rc3 - Rebuild against new libxml2, to make rspec test succeed * Thu Sep 24 2015 Mamoru TASAKA - 1.6.7-0.1.rc3 - 1.6.7.rc3 * Thu Jun 18 2015 Fedora Release Engineering - 1.6.6.2-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Jan 25 2015 Mamoru TASAKA - 1.6.6.2-1 - 1.6.6.2 * Fri Jan 23 2015 Mamoru TASAKA - 1.6.6.1-1 - 1.6.6.1 * Thu Jan 15 2015 Mamoru TASAKA - 1.6.5-2 - Rebuild for ruby 2.2 * Mon Dec 1 2014 Mamoru TASAKA - 1.6.5-1 - 1.6.5 * Fri Nov 7 2014 Mamoru TASAKA - 1.6.4.1-1 - 1.6.4.1 * Mon Aug 18 2014 Fedora Release Engineering - 1.6.3.1-1.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Tue Aug 12 2014 Mamoru TASAKA - 1.6.3.1-1 - 1.6.3.1 * Sun Jun 08 2014 Fedora Release Engineering - 1.6.2.1-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 14 2014 Mamoru TASAKA - 1.6.2.1-1 - 1.6.2.1 * Thu Apr 17 2014 Mamoru TASAKA - 1.6.1-2 - F-21: rebuild for ruby 2.1 / rubygems 2.2 * Wed Dec 25 2013 Mamoru TASAKA - 1.6.1-1 - 1.6.1 * Fri Oct 4 2013 Mamoru TASAKA - 1.6.0-1 - 1.6.0 * Sun Aug 04 2013 Fedora Release Engineering - 1.5.9-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Mar 28 2013 Mamoru TASAKA - 1.5.9-1 - 1.5.9 * Tue Mar 26 2013 Vít Ondruch - 1.5.6-3 - Use %%{gem_extdir_mri} instead of %%{gem_extdir}. * Sat Feb 23 2013 Vít Ondruch - 1.5.6-2 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Thu Feb 14 2013 Fedora Release Engineering - 1.5.6-1.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Jan 1 2013 Mamoru TASAKA - 1.5.6-1 - A Happy New Year - 1.5.6 * Fri Aug 17 2012 Vít Ondruch - 1.5.5-2 - Rebuilt againts libxml2 2.9. * Sat Jul 21 2012 Fedora Release Engineering - 1.5.5-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jun 25 2012 Mamoru Tasaka - 1.5.5-1 - 1.5.5 * Mon May 28 2012 Mamoru Tasaka - 1.5.2-3 - Fix Obsoletes (bug 822931) * Mon Apr 9 2012 Mamoru Tasaka - 1.5.2-1 - 1.5.2 * Tue Apr 03 2012 Bohuslav Kabrda - 1.5.0-3 - Fix conditionals for F17 to work for RHEL 7 as well. * Tue Jan 24 2012 Mamoru Tasaka - 1.5.0-2 - F-17: rebuild for ruby19 - For now aviod build failure by touching some files * Thu Jan 18 2012 Mamoru Tasaka - 1.5.0-1 - 1.5.0 * Sat Jan 14 2012 Fedora Release Engineering - 1.5.0-0.5.beta4.1 - F-17: Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sun Jun 26 2011 Mamoru Tasaka - 1.5.0-0.5.beta4 - Remove unneeded patch * Thu Mar 18 2011 Mamoru Tasaka - 1.5.0-0.4.beta4 - Patch for newer rake to make testsuite run * Wed Feb 09 2011 Fedora Release Engineering - 1.5.0-0.3.beta4.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sun Jan 30 2011 Mamoru Tasaka - 1.5.0-0.3.beta4 - 1.5.0.beta.4 * Tue Dec 7 2010 Mamoru Tasaka - 1.5.0-0.2.beta3 - 1.5.0.beta.3 * Sun Oct 17 2010 Mamoru Tasaka - 1.5.0-0.1.beta2 - Try 1.5.0.beta.2 * Fri Jul 30 2010 Mamoru Tasaka - 1.4.3.1-1 - 1.4.3.1 * Wed May 26 2010 Mamoru Tasaka - 1.4.2-1 - 1.4.2 * Thu Apr 29 2010 Mamoru Tasaka - 1.4.1-2 - Fix build failure with libxml2 >= 2.7.7 * Tue Dec 15 2009 Mamoru Tasaka - 1.4.1-1 - 1.4.1 * Mon Nov 9 2009 Mamoru Tasaka - 1.4.0-1 - 1.4.0 * Sat Aug 22 2009 Mamoru Tasaka - 1.3.3-2 - Fix test failure on sparc * Wed Jul 29 2009 Mamoru Tasaka - 1.3.3-1 - 1.3.3 * Sat Jul 25 2009 Mamoru Tasaka - 1.3.2-3 - F-12: Mass rebuild * Thu Jul 2 2009 Mamoru Tasaka - 1.3.2-2 - Enable test - Recompile with -O2 * Thu Jun 25 2009 Mamoru Tasaka - 1.3.2-1 - 1.3.2 * Thu Jun 11 2009 Mamoru Tasaka - 1.3.1-1 - 1.3.1 * Thu Mar 26 2009 Mamoru Tasaka - 1.2.3-1 - 1.2.3 * Thu Mar 19 2009 Mamoru Tasaka - 1.2.2-1 - 1.2.2 * Thu Mar 12 2009 Mamoru Tasaka - 1.2.1-1 - 1.2.1 * Tue Feb 24 2009 Mamoru Tasaka - 1.1.1-2 - F-11: Mass rebuild * Thu Jan 15 2009 Mamoru Tasaka - 1.1.1-1 - 1.1.1 * Thu Dec 25 2008 Mamoru Tasaka - 1.1.0-1 - Initial packaging