%global gem_name ox Name: rubygem-%{gem_name} Version: 2.1.3 Release: 1%{?dist} Summary: Fast XML parser and object serializer Group: Development/Languages License: BSD URL: http://www.ohler.com/ox Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: rubygems-devel BuildRequires: ruby-devel %if 0%{?fedora} && 0%{?fedora} <= 20 || 0%{?rhel} && 0%{?rhel} <= 7 Requires: ruby(release) Requires: ruby(rubygems) Provides: rubygem(%{gem_name}) = %{version} %endif %description A fast XML parser and object serializer that uses only standard C lib. Optimized XML (Ox), as the name implies was written to provide speed optimized XML handling. It was designed to be an alternative to Nokogiri and other Ruby XML parsers for generic XML parsing and as an alternative to Marshal for Object serialization. %package doc Summary: Documentation for %{name} Group: Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %if 0%{?fedora} && 0%{?fedora} <= 20 || 0%{?rhel} && 0%{?rhel} <= 7 mkdir -p %{buildroot}%{gem_extdir_mri}/lib/ox mv %{buildroot}%{gem_instdir}/lib/ox.so %{buildroot}%{gem_extdir_mri}/lib/ox/ %else mkdir -p %{buildroot}%{gem_extdir_mri}/ox cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/ cp -a .%{gem_extdir_mri}/*.so %{buildroot}%{gem_extdir_mri}/ox/ %endif rm -rf %{buildroot}%{gem_instdir}/ext/ # No test suite #%%check %files %dir %{gem_instdir}/ %doc %{gem_instdir}/LICENSE %{gem_libdir}/ %{gem_extdir_mri}/ %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.md %changelog * Fri Oct 03 2014 František Dvořák - 2.1.3-1 - Initial package