Blame SPECS/rubygem-concurrent-ruby.spec

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