%global gem_name mongo %global rubyabi 1.9.1 Summary: Ruby driver for the MongoDB Name: rubygem-%{gem_name} Version: 1.4.0 Release: 4%{?dist} Group: Development/Languages License: ASL 2.0 URL: http://www.mongodb.org Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: ruby(abi) = %{rubyabi} Requires: ruby(rubygems) Requires: ruby(bson) BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: rubygems BuildRequires: rubygems-devel BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} %description A Ruby driver for MongoDB. For more information about Mongo, see http://www.mongodb.org. %package doc Summary: Documentation for %{name} Group: Documentation 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 mkdir -p .%{gem_dir} # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec export CONFIGURE_ARGS="--with-cflags='%{optflags}'" # gem install compiles any C extensions and installs into a directory # We set that to be a local directory so that we can move it into the # buildroot in %%install gem install -V \ --local \ --install-dir .%{gem_dir} \ --bindir .%{_bindir} \ --force \ --rdoc \ %{gem_name}-%{version}.gem %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* %{buildroot}%{_bindir} chmod 755 %{buildroot}%{gem_instdir}/test/tools/repl_set_manager.rb %files %dir %{gem_instdir} %doc %{gem_instdir}/LICENSE.txt %{_bindir}/mongo_console %{gem_instdir}/bin %{gem_libdir} %{gem_spec} %exclude %{gem_cache} %files doc %doc %{gem_instdir}/mongo.gemspec %doc %{gem_instdir}/Rakefile %doc %{gem_instdir}/README.md %doc %{gem_docdir} %{gem_instdir}/docs %{gem_instdir}/test %changelog * Mon Jul 23 2012 Troy Dawson - 1.4.0-4 - Updated to meet new fedora rubygem guidelines * Thu Nov 17 2011 Troy Dawson - 1.4.0-3 - Changed group to Development/Languages - Changed the global variables - Seperated the doc and test into the doc rpm * Thu Nov 17 2011 Troy Dawson - 1.4.0-2 - Added %{?dist} to version * Tue Nov 15 2011 - 1.4.0-1 - Initial package