%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} # Generated from concurrent-ruby-1.0.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name concurrent-ruby Name: %{?scl_prefix}rubygem-%{gem_name} Version: 1.0.4 Release: 1%{?dist} Summary: Modern concurrency tools for Ruby Group: Development/Languages License: MIT URL: http://www.concurrent-ruby.com Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone https://github.com/ruby-concurrency/concurrent-ruby.git && cd concurrent-ruby # git checkout v1.0.4 && tar czvf concurrent-ruby-1.0.4-specs.tar.gz spec/ Source1: %{gem_name}-%{version}-specs.tar.gz Requires: %{?scl_prefix_ruby}ruby(release) Requires: %{?scl_prefix_ruby}ruby(rubygems) BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}ruby(rubygems) BuildRequires: %{?scl_prefix_ruby}ruby BuildRequires: %{?scl_prefix_ruby}rubygems-devel BuildRequires: %{?scl_prefix}rubygem(rspec) BuildArch: noarch Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} # Explicitly require runtime subpackage, as long as older scl-utils do not generate it %{?scl:Requires: %{?scl_prefix}runtime} %description Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more. Inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency patterns. %package doc Summary: Documentation for %{pkg_name} Group: Documentation Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{pkg_name}. %prep %{?scl:scl enable %{scl} - << \EOF} set -e gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -e # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %{?scl:EOF} %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ # Run the test suite %check pushd .%{gem_instdir} tar xzf %{SOURCE1} # -edge is not part of this gem. sed -i '/require.*concurrent-edge/ s/^/#/' spec/spec_helper.rb # We don't have the C extension. It would need to come from concurrent-ruby-ext # and that would lead to cicrular dependency. sed -i '/allow_c_extensions?/,/^ end/ s/^/#/' spec/concurrent/atomic/atomic_reference_spec.rb # We don't ship rubygem-timecop on the SCL # to reduce the SCL size. sed -i '/timecop/ s/^/#/' \ spec/concurrent/executor/timer_set_spec.rb sed -i '/context '"'"'task cancellation'"'"'/,/^ end$/ s/^/#/' \ spec/concurrent/executor/timer_set_spec.rb sed -i '/timecop/ s/^/#/' \ spec/concurrent/scheduled_task_spec.rb sed -i '/it '"'"'accepts a number of seconds/,/^ end$/ s/^/#/' \ spec/concurrent/scheduled_task_spec.rb # Exclude the -edge test cases. %{?scl:scl enable %{scl} - << \EOF} rspec -rspec_helper \ --exclude-pattern 'spec/concurrent/{actor_spec.rb,channel_spec.rb,lazy_register_spec.rb,channel/**/*,atomic/atomic_markable_reference_spec.rb,edge/**/*}' \ spec %{?scl:EOF} popd %files # There is no %%license macro on RHEL6. # https://bugzilla.redhat.com/show_bug.cgi?id=1386246 %{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %license %{gem_instdir}/LICENSE.txt %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %changelog * Wed Jan 11 2017 Jun Aruga - 1.0.4-1 - Update to Concurrent Ruby 1.0.4. * Mon Jul 04 2016 Vít Ondruch - 1.0.2-1 - Update to Concurrent Ruby 1.0.2. * Thu Feb 04 2016 Fedora Release Engineering - 1.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Dec 23 2015 Vít Ondruch - 1.0.0-1 - Initial package