From 481cf014eaf12fbbdd45a529b63b9a65947a9fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 3 Apr 2012 09:46:47 +0200 Subject: [PATCH] Fix conditionals for F17 to work for RHEL 7 as well. --- ...em-nokogiri-1.5.0.beta3-test-failure.patch | 11 ----------- rubygem-nokogiri.spec | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 18 deletions(-) delete mode 100644 rubygem-nokogiri-1.5.0.beta3-test-failure.patch diff --git a/rubygem-nokogiri-1.5.0.beta3-test-failure.patch b/rubygem-nokogiri-1.5.0.beta3-test-failure.patch deleted file mode 100644 index 7e1f317..0000000 --- a/rubygem-nokogiri-1.5.0.beta3-test-failure.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nokogiri-1.5.0.beta.3/test/html/test_element_description.rb.fail 2010-12-07 04:41:24.000000000 +0900 -+++ nokogiri-1.5.0.beta.3/test/html/test_element_description.rb 2010-12-07 04:46:35.000000000 +0900 -@@ -59,7 +59,7 @@ - if Nokogiri.uses_libxml? && Nokogiri::LIBXML_VERSION == '2.7.7' - assert_equal 65, sub_elements.length - elsif Nokogiri.uses_libxml? -- assert_equal 61, sub_elements.length -+ assert(61 <= sub_elements.length) - else - assert sub_elements.length > 0 - end diff --git a/rubygem-nokogiri.spec b/rubygem-nokogiri.spec index 15b9856..b806c90 100644 --- a/rubygem-nokogiri.spec +++ b/rubygem-nokogiri.spec @@ -4,20 +4,22 @@ %global mainver 1.5.0 #%%global prever .beta.4 -%global mainrel 2 +%global mainrel 3 %global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g') %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gemname nokogiri %global geminstdir %{gemdir}/gems/%{gemname}-%{mainver}%{?prever} -%if 0%{?fedora} >= 17 +%if %{?fedora:0%{fedora} >= 17}%{?rhel:0%{rhel} >= 7} +%global ruby19 1 %global rubyabi 1.9.1 %global gemdir %{gem_dir} %global gem_name %{gemname} %global geminstdir %{gem_instdir} %global gemsodir %{gem_extdir}/lib %else +%global ruby19 0 %global gemsodir %{ruby_sitearch} %endif @@ -47,7 +49,7 @@ BuildRequires: rubygem(hoe) BuildRequires: rubygem(rake) BuildRequires: rubygem(rake-compiler) BuildRequires: rubygem(minitest) -%if 0%{?fedora} >= 17 +%if 0%{?ruby19} > 0 BuildRequires: rubygems-devel %endif #BuildRequires: ruby(racc) @@ -159,7 +161,7 @@ rm -rf %{buildroot}%{geminstdir}/ext/%{gemname}/ rm -rf %{buildroot}%{geminstdir}/tmp/ rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths,.gemtest} -%if 0%{?fedora} < 17 +%if 0%{?ruby19} < 1 # The following method is completely copied from rubygem-gettext # spec file # @@ -236,7 +238,7 @@ popd # fails without TZ on sparc export TZ="Asia/Tokyo" #??? -%if 0%{?fedora} >= 17 +%if 0%{?ruby19} > 0 LANG=ja_JP.UTF-8 %endif @@ -256,7 +258,7 @@ popd %files %defattr(-,root, root,-) %{_bindir}/%{gemname} -%if 0%{?fedora} < 17 +%if 0%{?ruby19} < 1 %{ruby_sitearch}/*.so %else %{gem_extdir}/ @@ -285,7 +287,7 @@ popd %{geminstdir}/test/ %{gemdir}/doc/%{gemname}-%{mainver}%{?prever}/ -%if 0%{?fedora} < 17 +%if 0%{?ruby19} < 1 %files -n ruby-%{gemname} %defattr(-,root,root,-) %{ruby_sitelib}/*%{gemname}.rb @@ -294,6 +296,9 @@ popd %endif %changelog +* 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