[rubygem-bson_ext] Initial import (#736994).

Bohuslav Kabrda bkabrda at fedoraproject.org
Mon Sep 26 07:32:50 UTC 2011


commit 8f515b8d3acb9137e3e3e6ac2dd04c5b0ffd458f
Author: bkabrda <bkabrda at dhcp-0-215.brq.redhat.com>
Date:   Mon Sep 26 07:50:01 2011 +0200

    Initial import (#736994).

 .gitignore            |    2 +
 rubygem-bson_ext.spec |  111 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    2 +
 3 files changed, 115 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0ca0a4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/bson_ext-1.4.0-tests-upstream.tgz
+/bson_ext-1.4.0.gem
diff --git a/rubygem-bson_ext.spec b/rubygem-bson_ext.spec
new file mode 100644
index 0000000..80d9cae
--- /dev/null
+++ b/rubygem-bson_ext.spec
@@ -0,0 +1,111 @@
+# Generated from bson_ext-1.3.1.gem by gem2rpm -*- rpm-spec -*-
+%global gemname bson_ext
+
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global rubyabi 1.8
+%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
+
+Summary: C extensions for Ruby BSON
+Name: rubygem-%{gemname}
+Version: 1.4.0
+Release: 2%{?dist}
+Group: Development/Languages
+License: ASL 2.0
+URL: http://www.mongodb.org/display/DOCS/BSON
+
+Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+#git clone http://github.com/mongodb/mongo-ruby-driver.git && cd mongo-ruby-driver/
+#git checkout 1.4.0
+#tar czvf bson_ext-1.4.0-tests-upstream.tgz test/bson/ test/support/
+Source1: %{gemname}-%{version}-tests-upstream.tgz
+
+Requires: rubygem(bson) >= 1.4.0
+Requires: ruby(abi) = %{rubyabi}
+Requires: ruby(rubygems)
+Requires: ruby
+BuildRequires: ruby-devel
+BuildRequires: ruby(abi) = %{rubyabi}
+BuildRequires: ruby(rubygems) 
+BuildRequires: ruby 
+# for tests:
+BuildRequires: rubygem(bson) >= 1.4.0
+BuildRequires: rubygem(shoulda)
+BuildRequires: rubygem(mocha)
+BuildRequires: rubygem(json)
+
+Provides: rubygem(%{gemname}) = %{version}
+
+%description
+C extensions to accelerate the Ruby BSON serialization. For more information
+about BSON, see http://bsonspec.org.  For information about MongoDB, see
+http://www.mongodb.org.
+
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}
+
+
+%prep
+%setup -q -c -T
+mkdir -p .%{gemdir}
+export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+gem install --local --install-dir .%{gemdir} \
+            -V --force %{SOURCE0}
+
+
+%build
+
+
+%install
+mkdir -p %{buildroot}%{gemdir}
+cp -a .%{gemdir}/* \
+        %{buildroot}%{gemdir}/
+mkdir -p %{buildroot}%{ruby_sitearch}/%{gemname}
+mv %{buildroot}%{geminstdir}/ext/%{gemname}/cbson.so %{buildroot}%{ruby_sitearch}/%{gemname}/
+
+# Remove the binary extension sources and build leftovers.
+rm -rf %{buildroot}%{geminstdir}/ext
+
+
+%check
+pushd %{_tmppath}
+tar xzvf %{SOURCE1}
+#remove the inclusion of bson (absolute path that doesn't exist) and rather require it while running ruby
+sed -i '1d' ./test/bson/test_helper.rb
+ruby -rubygems -I%{buildroot}%{ruby_sitearch}/ -e "require 'bson';Dir.glob('test/bson/*_test.rb').each {|t| require t}"
+popd
+rm -rf %{_tmppath}/test
+
+
+%files
+%dir %{geminstdir}
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%dir %{ruby_sitearch}/%{gemname}
+%{ruby_sitearch}/%{gemname}/cbson.so
+
+%files doc
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%{geminstdir}/Rakefile
+%{geminstdir}/bson_ext.gemspec
+
+%changelog
+* Fri Sep 23 2011 bkabrda <bkabrda at redhat.com> - 1.4.0-2
+- Moved test cleanup to check section.
+
+* Thu Sep 22 2011 Bohuslav Kabrda <bkabrda at redhat.com> - 1.4.0-1
+- Version 1.4.0 (removed the fix for failing tests, as it is now in upstream).
+
+* Tue Sep 20 2011 Bohuslav Kabrda <bkabrda at redhat.com> - 1.3.1-2
+- Added the fix for failing tests on i386 (should be fixed in 1.4.0, so it can be removed then) -
+  see https://github.com/mongodb/mongo-ruby-driver/commit/e613880922beaf1e80274aa183aa5ac0a9d09ac4
+
+* Thu Sep 08 2011 Bohuslav Kabrda <bkabrda at redhat.com> - 1.3.1-1
+- Initial package
diff --git a/sources b/sources
index e69de29..563d94b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+461c9da5091eafbd121de8d4a0760256  bson_ext-1.4.0-tests-upstream.tgz
+f98a879019a831f862ca1951f73a7693  bson_ext-1.4.0.gem


More information about the scm-commits mailing list