diff --git a/.gitignore b/.gitignore index 91d0793..2ac25c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ nokogiri-1.4.2.gem nokogiri-1.4.3.1.gem +/nokogiri-1.5.0.beta.2.gem diff --git a/nokogiri-1.4.2-test-xml-element-number.patch b/nokogiri-1.4.2-test-xml-element-number.patch deleted file mode 100644 index 117134b..0000000 --- a/nokogiri-1.4.2-test-xml-element-number.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nokogiri-1.4.2/test/html/test_element_description.rb.elements 2010-05-26 01:26:12.000000000 +0900 -+++ nokogiri-1.4.2/test/html/test_element_description.rb 2010-05-26 01:35:42.000000000 +0900 -@@ -59,7 +59,7 @@ - if Nokogiri::LIBXML_VERSION == '2.7.7' - assert_equal 65, sub_elements.length - else -- assert_equal 61, sub_elements.length -+ assert( 61 <= sub_elements.length ) - end - end - diff --git a/rubygem-nokogiri.spec b/rubygem-nokogiri.spec index cbd5a9f..ec98089 100644 --- a/rubygem-nokogiri.spec +++ b/rubygem-nokogiri.spec @@ -1,10 +1,16 @@ -%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") -%define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']") -%define rubyabi 1.8 +%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") +%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']") +%global rubyabi 1.8 -%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) -%define gemname nokogiri -%define geminstdir %{gemdir}/gems/%{gemname}-%{version} +%global mainver 1.5.0 +%global prever .beta.2 + +%global mainrel 1 +%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} # Note for packager: # Nokogiri 1.4.3.1 gem says that Nokogiri upstream will @@ -13,15 +19,13 @@ Summary: An HTML, XML, SAX, and Reader parser Name: rubygem-%{gemname} -Version: 1.4.3.1 -Release: 1%{?dist} +Version: %{mainver} +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}-%{version}.gem -Patch0: nokogiri-1.4.2-test-xml-element-number.patch +Source0: http://gems.rubyforge.org/gems/%{gemname}-%{mainver}%{?prever}.gem -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby(rubygems) BuildRequires: rubygem(hoe) @@ -43,12 +47,21 @@ 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} +Group: Development/Languages +Requires: %{name} = %{version}-%{release} + +%description jruby +This package contains JRuby support for %{name}. +%endif + + %package doc Summary: Documentation for %{name} Group: Documentation -# Directory ownership issue Requires: %{name} = %{version}-%{release} -Requires: ruby(rubygems) %description doc This package contains documentation for %{name}. @@ -73,9 +86,13 @@ gem install \ -V --force \ %{SOURCE0} -pushd .%{geminstdir} -%patch0 -p1 -b .orig_fail -popd +# Permission +chmod 0644 .%{gemdir}/cache/%{gemname}-%{mainver}%{?prever}.gem + +# Remove precompiled Java .jar file +rm -f .%{geminstdir}/lib/*.jar +# For now remove JRuby support +rm -rf .%{geminstdir}/ext/java %build # cflags wrong (-O3 passed), recompiling @@ -109,7 +126,8 @@ do done # cleanups -rm -rf %{buildroot}%{geminstdir}/{ext,tmp}/ +rm -rf %{buildroot}%{geminstdir}/ext/%{gemname}/ +rm -rf %{buildroot}%{geminstdir}/tmp/ rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths} # The following method is completely copied from rubygem-gettext @@ -184,6 +202,7 @@ export TZ="Asia/Tokyo" pushd ./%{geminstdir} rake test --trace +rake spec --trace popd %files @@ -193,16 +212,25 @@ popd %dir %{geminstdir}/ %doc %{geminstdir}/[A-Z]* %exclude %{geminstdir}/Rakefile -%{geminstdir}/[a-l]*/ -%{gemdir}/cache/%{gemname}-%{version}.gem -%{gemdir}/specifications/%{gemname}-%{version}.gemspec +%{geminstdir}/bin/ +%{geminstdir}/lib/ +%{gemdir}/cache/%{gemname}-%{mainver}%{?prever}.gem +%{gemdir}/specifications/%{gemname}-%{mainver}%{?prever}.gemspec + +%if 0 +%files jruby +%defattr(-,root,root,-) +%{geminstdir}/ext/java/ +%endif %files doc %defattr(-,root,root,-) %{geminstdir}/Rakefile +%{geminstdir}/deps.rip +%{geminstdir}/spec/ %{geminstdir}/tasks/ %{geminstdir}/test/ -%{gemdir}/doc/%{gemname}-%{version}/ +%{gemdir}/doc/%{gemname}-%{mainver}%{?prever}/ %files -n ruby-%{gemname} %defattr(-,root,root,-) @@ -211,6 +239,9 @@ popd %{ruby_sitelib}/xsd/ %changelog +* 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 diff --git a/sources b/sources index 5daca86..4e4909a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -36d092a5f40b8dece5b32d434cc73fd2 nokogiri-1.4.3.1.gem +5dc94c509b66e81a4520a9b8d75ea803 nokogiri-1.5.0.beta.2.gem