From 81cacd0c16f433c6b5e3fbd025fe19fc71be8902 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 17 Apr 2014 17:20:49 +0900 Subject: [PATCH] F-21: rebuild for ruby 2.1 / rubygems 2.2 --- rubygem-nokogiri.spec | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/rubygem-nokogiri.spec b/rubygem-nokogiri.spec index 0c78161..fd35295 100644 --- a/rubygem-nokogiri.spec +++ b/rubygem-nokogiri.spec @@ -6,7 +6,7 @@ %global mainver 1.6.1 #%%global prever .beta.4 -%global mainrel 1 +%global mainrel 2 %global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g') %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) @@ -35,11 +35,11 @@ Summary: An HTML, XML, SAX, and Reader parser Name: rubygem-%{gemname} Version: %{mainver} -Release: %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}%{?dist}.1 +Release: %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}%{?dist} Group: Development/Languages License: MIT URL: http://nokogiri.rubyforge.org/nokogiri/ -Source0: http://gems.rubyforge.org/gems/%{gemname}-%{mainver}%{?prever}.gem +Source0: https://rubygems.org/gems/%{gemname}-%{mainver}%{?prever}.gem # ./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 @@ -157,9 +157,19 @@ cp -a ./%{gemdir}/* %{buildroot}%{gemdir} find %{buildroot} -name \*.orig_\* | xargs rm -vf # move arch dependent files to %%gem_extdir +%if 0%{?fedora} >= 21 +mkdir -p %{buildroot}%{gem_extdir_mri} +cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/ + +pushd %{buildroot} +rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log} +popd + +%else mkdir -p %{buildroot}%{gemsodir}/%{gemname} mv %{buildroot}%{geminstdir}/lib/%{gemname}/*.so \ %{buildroot}%{gemsodir}/%{gemname}/ +%endif # move bin/ files mkdir -p %{buildroot}%{_bindir} @@ -191,7 +201,12 @@ LANG=ja_JP.UTF-8 pushd ./%{geminstdir} # Need investigation. For now anyway build -ruby -I.:lib:test \ +ruby \ +%if 0%{?fedora} >= 21 + -I.:lib:test:ext \ +%else + -I.:lib:test \ +%endif -e \ "require 'test/helper' ; Dir.glob('test/**/test_*.rb'){|f| require f}" || \ echo "Please investigate this" @@ -214,7 +229,11 @@ popd %exclude %{geminstdir}/Gemfile %{geminstdir}/bin/ %{geminstdir}/lib/ +%if 0%{?fedora} >= 21 +%exclude %{gemdir}/cache/%{gemname}-%{mainver}%{?prever}.gem +%else %{gemdir}/cache/%{gemname}-%{mainver}%{?prever}.gem +%endif %{gemdir}/specifications/%{gemname}-%{mainver}%{?prever}.gemspec %if 0 @@ -233,6 +252,9 @@ popd %{gemdir}/doc/%{gemname}-%{mainver}%{?prever}/ %changelog +* 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