valtri pushed to rubygem-ox (f20). "Initial import (#1142491)."

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Mar 27 13:45:55 UTC 2015


>From 6ccd6c46f03a06beff5f04835c1ec10197d21150 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= <valtri at civ.zcu.cz>
Date: Fri, 27 Mar 2015 14:26:11 +0100
Subject: Initial import (#1142491).


diff --git a/.gitignore b/.gitignore
index e69de29..e99883c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/ox-2.1.8.gem
+/rubygem-ox-2.1.8-test.tgz
diff --git a/rubygem-ox.spec b/rubygem-ox.spec
new file mode 100644
index 0000000..629cd87
--- /dev/null
+++ b/rubygem-ox.spec
@@ -0,0 +1,128 @@
+%global gem_name ox
+
+# tests require minitest >= 5
+%if 0%{?fedora} && 0%{?fedora} <= 20 || 0%{?rhel} && 0%{?rhel} <= 7
+%global with_tests 0
+%else
+%global with_tests 1
+%endif
+
+Name:           rubygem-%{gem_name}
+Version:        2.1.8
+Release:        2%{?dist}
+Summary:        Fast XML parser and object serializer
+
+Group:          Development/Languages
+# lib/ox.rb licensed also under MIT:
+# https://github.com/ohler55/ox/pull/108
+License:        MIT
+URL:            http://www.ohler.com/ox
+Source0:        https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# git clone https://github.com/ohler55/ox && cd ox
+# git checkout v2.1.8
+# tar -czf rubygem-ox-2.1.8-test.tgz test/
+Source1:        %{name}-%{version}-test.tgz
+
+BuildRequires:  rubygems-devel
+BuildRequires:  ruby-devel
+%if 0%{?with_tests}
+BuildRequires:  rubygem(minitest) >= 5
+%endif
+%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} -a1
+
+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/
+
+
+%if 0%{?with_tests}
+%check
+cp -pr test/ ./%{gem_instdir}
+pushd ./%{gem_instdir}
+# always use minitest (tests.rb requires it anyway)
+sed -i -e 's/\(use_minitest\) = .*/\1 = 1/' test/sax/sax_test.rb
+ruby -Ilib:test test/tests.rb
+ruby -Ilib:test test/sax/sax_test.rb
+rm -rf test
+popd
+%endif
+
+
+%files
+%dir %{gem_instdir}/
+%license %{gem_instdir}/LICENSE
+%doc %{gem_instdir}/README.md
+%{gem_libdir}/
+%{gem_extdir_mri}/
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+
+
+%changelog
+* Fri Mar 27 2015 František Dvořák <valtri at civ.zcu.cz> - 2.1.8-2
+- Use the %%license tag
+- Move README.md to the main package
+
+* Tue Feb 17 2015 František Dvořák <valtri at civ.zcu.cz> - 2.1.8-1
+- Update to 2.1.8
+
+* Tue Feb 10 2015 František Dvořák <valtri at civ.zcu.cz> - 2.1.7-1
+- Update to 2.1.7
+
+* Wed Dec 31 2014 František Dvořák <valtri at civ.zcu.cz> - 2.1.6-1
+- Update to 2.1.6
+- Changed license from BSD to MIT (https://github.com/ohler55/ox/issues/104)
+- Tests added
+
+* Fri Oct 03 2014 František Dvořák <valtri at civ.zcu.cz> - 2.1.3-1
+- Initial package
diff --git a/sources b/sources
index e69de29..c434232 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+d0aff68da2f198e1dc298d272e72d74b  ox-2.1.8.gem
+6f7277a52d5f2a772e629c0e95c21b9c  rubygem-ox-2.1.8-test.tgz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/rubygem-ox.git/commit/?h=f20&id=6ccd6c46f03a06beff5f04835c1ec10197d21150


More information about the scm-commits mailing list