This commit is contained in:
Mamoru TASAKA 2012-04-09 18:27:08 +09:00
parent 481cf014ea
commit b0329e1b24
3 changed files with 21 additions and 33 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ nokogiri-1.4.3.1.gem
/nokogiri-1.5.0.beta.3.gem
/nokogiri-1.5.0.beta.4.gem
/nokogiri-1.5.0.gem
/nokogiri-1.5.2.gem

View File

@ -1,10 +1,10 @@
%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
%global rubyabi 1.8
%global mainver 1.5.0
%global mainver 1.5.2
#%%global prever .beta.4
%global mainrel 3
%global mainrel 1
%global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g')
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
@ -38,16 +38,11 @@ URL: http://nokogiri.rubyforge.org/nokogiri/
Source0: http://gems.rubyforge.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
#Patch0: rubygem-nokogiri-1.5.0-allow-non-crosscompile.patch
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: ruby(rubygems)
##
## For %%check
BuildRequires: rubygem(hoe)
# Not available yet
# BuildRequires: rubygem(hoe-debugging)
BuildRequires: rubygem(rake)
BuildRequires: rubygem(rake-compiler)
BuildRequires: rubygem(minitest)
%if 0%{?ruby19} > 0
BuildRequires: rubygems-devel
@ -111,7 +106,7 @@ gem install \
# patches
pushd .%{geminstdir}
%patch0 -p1
#%%patch0 -p1
popd
# Permission
@ -123,15 +118,6 @@ rm -f .%{geminstdir}/lib/*.jar
rm -rf .%{geminstdir}/ext/java
%build
# cflags wrong (-O3 passed), recompiling
pushd ./%{geminstdir}
sed -i.flags -e 's|-O3||' ext/nokogiri/extconf.rb
find . -name \*.so -or -name \*.o -exec rm -f {} \;
# touch
touch \
lib/nokogiri/css/tokenizer.rb \
lib/nokogiri/css/parser.rb
rake -v compile --trace
%install
mkdir -p %{buildroot}%{gemdir}
@ -227,13 +213,6 @@ create_symlink_rec %{geminstdir}/lib %{ruby_sitelib}
%check
# Ah....
rm -rf TMPBINDIR
mkdir -p TMPBINDIR
pushd TMPBINDIR
ln -sf /bin/true sudo
export PATH=$(pwd):$PATH
popd
# test_exslt(TestXsltTransforms) [./test/test_xslt_transforms.rb:93]
# fails without TZ on sparc
export TZ="Asia/Tokyo"
@ -243,16 +222,21 @@ LANG=ja_JP.UTF-8
%endif
pushd ./%{geminstdir}
# Some files are missing and due to it some tests fail, skil
for TEST in \
test_document_xhtml_enc
# Some files are missing and due to it some tests fail, skip
SKIPTEST="test/xml/test_xinclude.rb"
for f in $SKIPTEST
do
grep -l "def $TEST" test/*/*.rb | \
xargs sed -i.fail -e "/$TEST/a \ # Needed file does not exist\n return\n"
mv $f $f.skip
done
ruby -I.:lib:test -e \
"require 'minitest/autorun' ; Dir.glob('test/**/test_*.rb'){|f| require f}"
for f in $SKIPTEST
do
mv $f.skip $f
done
rake test --trace
# rake spec --trace
popd
%files
@ -296,6 +280,9 @@ popd
%endif
%changelog
* Mon Apr 9 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.5.2-1
- 1.5.2
* Tue Apr 03 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.5.0-3
- Fix conditionals for F17 to work for RHEL 7 as well.

View File

@ -1 +1 @@
91aef0c0d912554f0abfbd82666a0504 nokogiri-1.5.0.gem
38ce6d3bf4020667de8816bcd3daeacc nokogiri-1.5.2.gem