F-17: rebuild for ruby19

This commit is contained in:
TASAKA Mamoru 2012-01-24 18:04:16 +09:00
parent 53c144ce26
commit 8829b1005b

View File

@ -1,17 +1,26 @@
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
%global rubyabi 1.8
%global mainver 1.5.0
#%%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)
%global gemname nokogiri
%global geminstdir %{gemdir}/gems/%{gemname}-%{mainver}%{?prever}
%if 0%{?fedora} >= 17
%global rubyabi 1.9.1
%global gemdir %{gem_dir}
%global gem_name %{gemname}
%global geminstdir %{gem_instdir}
%global gemsodir %{gem_extdir}/lib
%else
%global gemsodir %{ruby_sitearch}
%endif
# Note for packager:
# Nokogiri 1.4.3.1 gem says that Nokogiri upstream will
# no longer support ruby 1.8.6 after 2010-08-01, so
@ -38,6 +47,10 @@ BuildRequires: rubygem(hoe)
BuildRequires: rubygem(rake)
BuildRequires: rubygem(rake-compiler)
BuildRequires: rubygem(minitest)
%if 0%{?fedora} >= 17
BuildRequires: rubygems-devel
%endif
BuildRequires: ruby(racc)
##
## Others
BuildRequires: libxml2-devel
@ -46,6 +59,7 @@ BuildRequires: ruby-devel
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
Provides: rubygem(%{gemname}) = %{version}-%{release}
Obsoletes: ruby-%{gemname} <= 1.5.0-2
%description
Nokogiri parses and searches XML/HTML very quickly, and also has
@ -114,17 +128,16 @@ find . -name \*.so -or -name \*.o -exec rm -f {} \;
rake -v compile --trace
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
cp -a ./%{gemdir}/* %{buildroot}%{gemdir}
# Remove backup file
find %{buildroot} -name \*.orig_\* | xargs rm -vf
# move arch dependent files to %%ruby_sitearch
mkdir -p %{buildroot}%{ruby_sitearch}/%{gemname}
# move arch dependent files to %%gem_extdir
mkdir -p %{buildroot}%{gemsodir}/%{gemname}
mv %{buildroot}%{geminstdir}/lib/%{gemname}/*.so \
%{buildroot}%{ruby_sitearch}/%{gemname}/
%{buildroot}%{gemsodir}/%{gemname}/
# move bin/ files
mkdir -p %{buildroot}%{_prefix}
@ -142,6 +155,7 @@ rm -rf %{buildroot}%{geminstdir}/ext/%{gemname}/
rm -rf %{buildroot}%{geminstdir}/tmp/
rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths,.gemtest}
%if 0%{?fedora} < 17
# The following method is completely copied from rubygem-gettext
# spec file
#
@ -202,11 +216,9 @@ popd
}
create_symlink_rec %{geminstdir}/lib %{ruby_sitelib}
%endif
%clean
rm -rf %{buildroot}
%check
# Ah....
rm -rf TMPBINDIR
@ -219,6 +231,10 @@ popd
# test_exslt(TestXsltTransforms) [./test/test_xslt_transforms.rb:93]
# fails without TZ on sparc
export TZ="Asia/Tokyo"
#???
%if 0%{?fedora} >= 17
LANG=ja_JP.UTF-8
%endif
pushd ./%{geminstdir}
# Some files are missing and due to it some tests fail, skil
@ -236,7 +252,11 @@ popd
%files
%defattr(-,root, root,-)
%{_bindir}/%{gemname}
%{ruby_sitearch}/%{gemname}/
%if 0%{?fedora} < 17
%{ruby_sitearch}/*.so
%else
%{gem_extdir}/
%endif
%dir %{geminstdir}/
%doc %{geminstdir}/[A-Z]*
%doc %{geminstdir}/nokogiri_help_responses.md
@ -261,13 +281,18 @@ popd
%{geminstdir}/test/
%{gemdir}/doc/%{gemname}-%{mainver}%{?prever}/
%if 0%{?fedora} < 17
%files -n ruby-%{gemname}
%defattr(-,root,root,-)
%{ruby_sitelib}/*%{gemname}.rb
%{ruby_sitelib}/%{gemname}/
%{ruby_sitelib}/xsd/
%endif
%changelog
* Tue Jan 24 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.5.0-2
- F-17: rebuild for ruby19
* Thu Jan 18 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.5.0-1
- 1.5.0