Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.8
rubygem-nokogiri-17
rubygem-nokogiri-17.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rubygem-nokogiri-17.spec of Package rubygem-nokogiri-17
%if 0%{?fedora} <= 16 && 0%{?rhel} <= 6 %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']") %endif %global mainver 1.7.2 #%%global prever .rc3 %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} %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 %if 0%{?fedora} < 19 %global rubyabi 1.9.1 %endif %global ruby19 1 %global gemdir %{gem_dir} %global geminstdir %{gem_instdir} %global gemsodir %{gem_extdir_mri}/lib %else %global ruby19 0 %global gemsodir %{ruby_sitearch} %endif %global gem_name %{gemname} # 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 # it seems that 1.4.3.1 is the last version for F-13 and below. Summary: An HTML, XML, SAX, and Reader parser Name: rubygem-%{gemname}-17 Version: %{mainver} Release: %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}%{?dist} Group: Development/Languages License: MIT URL: http://nokogiri.rubyforge.org/nokogiri/ 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 # Shut down libxml2 version unmatching warning Patch0: rubygem-%{gemname}-1.6.6.4-shutdown-libxml2-warning.patch Patch1: rubygem-%{gemname}-1.7-fix-xslt-test.patch %if 0%{?fedora} >= 19 Requires: ruby(release) BuildRequires: ruby(release) %else Requires: ruby(abi) = %{rubyabi} Requires: ruby BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby %endif BuildRequires: ruby(rubygems) ## ## For %%check BuildRequires: rubygem(minitest) BuildRequires: rubygems-devel Obsoletes: ruby-%{gemname} <= 1.5.2-2 #BuildRequires: ruby(racc) ## ## Others BuildRequires: rubygem(pkg-config) BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: ruby-devel Requires: ruby(rubygems) Provides: rubygem(%{gemname}) = %{version}-%{release} %description Nokogiri parses and searches XML/HTML very quickly, and also has 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 Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %package -n ruby-%{gemname} Summary: Non-Gem support package for %{gemname} Group: Development/Languages Requires: %{name} = %{version}-%{release} Provides: ruby(%{gemname}) = %{version}-%{release} %description -n ruby-%{gemname} This package provides non-Gem support for %{gemname}. %global version %{mainver}%{?prever} %prep %setup -q -T -c # Gem repack TOPDIR=$(pwd) mkdir tmpunpackdir pushd tmpunpackdir gem unpack %{SOURCE0} cd %{gem_name}-%{version} # patches %patch0 -p1 %patch1 -p1 gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec # remove bundled external libraries sed -i \ -e 's|, "ports/archives/[^"][^"]*"||g' \ -e 's|, "ports/patches/[^"][^"]*"||g' \ %{gem_name}.gemspec # Actually not needed when using system libraries sed -i -e '\@mini_portile@d' %{gem_name}.gemspec # Ummm... env LANG=ja_JP.UTF-8 gem build %{gem_name}.gemspec mv %{gem_name}-%{version}.gem $TOPDIR popd rm -rf tmpunpackdir %build mkdir -p ./%{gemdir} # 1.6.0 needs this export NOKOGIRI_USE_SYSTEM_LIBRARIES=yes %gem_install # 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 %install mkdir -p %{buildroot}%{gemdir} cp -a ./%{gemdir}/* %{buildroot}%{gemdir} # Remove backup file 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} cp -pa .%{_bindir}/* \ %{buildroot}%{_bindir}/ # remove all shebang for f in $(find %{buildroot}%{geminstdir} -name \*.rb) do sed -i -e '/^#!/d' $f chmod 0644 $f done # cleanups rm -rf %{buildroot}%{geminstdir}/ext/%{gemname}/ rm -rf %{buildroot}%{geminstdir}/tmp/ rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths,.gemtest,.travis.yml} rm -f %{buildroot}%{geminstdir}/appveyor.yml rm -f %{buildroot}%{geminstdir}/.cross_rubies rm -f %{buildroot}%{geminstdir}/{build_all,dependencies.yml,test_all} rm -f %{buildroot}%{geminstdir}/.editorconfig rm -rf %{buildroot}%{geminstdir}/suppressions/ rm -rf %{buildroot}%{geminstdir}/patches/ %check # Ah.... # test_exslt(TestXsltTransforms) [./test/test_xslt_transforms.rb:93] # fails without TZ on sparc export TZ="Asia/Tokyo" #??? LANG=ja_JP.UTF-8 pushd ./%{geminstdir} # Need investigation. For now anyway build 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}" || \ exit 1 echo "Please investigate this" for f in $SKIPTEST do mv $f.skip $f done popd %files %defattr(-,root, root,-) %{_bindir}/%{gemname} %{gem_extdir_mri}/ %dir %{geminstdir}/ %doc %{geminstdir}/[A-Z]* #%%doc %{geminstdir}/nokogiri_help_responses.md %exclude %{geminstdir}/Rakefile %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 %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}-%{mainver}%{?prever}/
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor