%global gem_name amq-protocol Name: rubygem-%{gem_name} Version: 1.9.2 Release: 1%{?dist} Summary: AMQP 0.9.1 encoder & decoder Group: Development/Languages License: MIT URL: http://github.com/ruby-amqp/amq-protocol Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: ruby(release) Requires: ruby(rubygems) BuildRequires: rubygem(rspec) BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} %description amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not an AMQP client: amq-protocol only handles serialization and deserialization. If you want to write your own AMQP client, this gem can help you with that. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %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 -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ pushd %{buildroot}%{gem_instdir}/ rm -rf Rakefile amq-protocol.gemspec benchmarks \ .gitignore .travis.yml .rspec codegen profiling \ generate.rb .gitmodules popd %check pushd ./%{gem_instdir} sed -i /effin_utf8/d Gemfile sed -i /effin_utf8/d spec/spec_helper.rb sed -e "/require 'bundler\/setup'/d" -i spec/spec_helper.rb rspec -Ilib spec popd %files %dir %{gem_instdir} %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %doc %{gem_instdir}/LICENSE %files doc %{gem_docdir} %{gem_instdir}/README.md %{gem_instdir}/ChangeLog.md %{gem_instdir}/Gemfile %{gem_instdir}/spec/* %changelog * Sat Feb 22 2014 Nitesh Narayan Lal - 1.9.2-2 - Updated as per the comments * Sat Jan 11 2014 Nitesh Narayan Lal - 1.9.2-1 - Initial package