Blame SPECS/rubygem-dalli.spec

e5b264
%{?scl:%scl_package rubygem-%{gem_name}}
e5b264
%{!?scl:%global pkg_name %{name}}
e5b264
e5b264
# Generated from dalli-2.6.4.gem by gem2rpm -*- rpm-spec -*-
e5b264
%global gem_name dalli
e5b264
e5b264
# Depends on Rails and its needed by Rails
e5b264
%global enable_test 1
e5b264
e5b264
Name: %{?scl_prefix}rubygem-%{gem_name}
e5b264
Version: 2.7.2
e5b264
Release: 2%{?dist}
e5b264
Summary: High performance memcached client for Ruby
e5b264
Group: Development/Languages
e5b264
License: MIT
e5b264
URL: http://github.com/mperham/dalli
e5b264
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
e5b264
# This makes the test suite to behave a bit better.
e5b264
# https://github.com/mperham/dalli/commit/d204330c6ed4bbc6f15717d6ecbf597c586387db
e5b264
Patch0: rubygem-dalli-2.7.2-Assorted-changes-to-get-specs-to-green.patch
e5b264
Requires: %{?scl_prefix_ruby}ruby(release)
e5b264
Requires: %{?scl_prefix_ruby}ruby(rubygems)
e5b264
BuildRequires: %{?scl_prefix_ruby}ruby(release)
e5b264
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
e5b264
%if 0%{enable_test} > 0
e5b264
BuildRequires: memcached
e5b264
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
e5b264
BuildRequires: %{?scl_prefix}rubygem(mocha)
e5b264
BuildRequires: %{?scl_prefix}rubygem(rails)
e5b264
%endif
e5b264
BuildRequires: %{?scl_prefix_ruby}ruby
e5b264
BuildArch: noarch
e5b264
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
e5b264
e5b264
%description
e5b264
High performance memcached client for Ruby
e5b264
e5b264
%package doc
e5b264
Summary: Documentation for %{pkg_name}
e5b264
Group: Documentation
e5b264
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
e5b264
BuildArch: noarch
e5b264
e5b264
%description doc
e5b264
Documentation for %{pkg_name}
e5b264
e5b264
%prep
e5b264
%{?scl:scl enable %{scl} "}
e5b264
gem unpack %{SOURCE0}
e5b264
%{?scl:"}
e5b264
e5b264
%setup -q -D -T -n  %{gem_name}-%{version}
e5b264
e5b264
%{?scl:scl enable %{scl} "}
e5b264
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
e5b264
%{?scl:"}
e5b264
e5b264
%patch0 -p1
e5b264
e5b264
%build
e5b264
%{?scl:scl enable %{scl} - << \EOF}
e5b264
gem build %{gem_name}.gemspec
e5b264
%gem_install
e5b264
%{?scl:EOF}
e5b264
e5b264
%install
e5b264
mkdir -p %{buildroot}%{gem_dir}
e5b264
cp -pa .%{gem_dir}/* \
e5b264
        %{buildroot}%{gem_dir}/
e5b264
e5b264
%check
e5b264
%if 0%{enable_test} > 0
e5b264
pushd .%{gem_instdir}
e5b264
%{?scl:scl enable %{scl} - << \EOF}
e5b264
set -e
e5b264
e5b264
# connection_pool is not yet in Fedora
e5b264
sed -i -e '3d' test/test_active_support.rb
e5b264
# There are 2 failures and 1 error regarding SALS
e5b264
# https://github.com/mperham/dalli/issues/439
e5b264
ruby -Ilib:test -e "Dir.glob './test/test_*.rb', &method(:require)" \
e5b264
 | grep '121 runs, 14578 assertions, 2 failures, 1 errors, 0 skips'
e5b264
%{?scl:EOF}
e5b264
popd
e5b264
%endif
e5b264
e5b264
%files
e5b264
%dir %{gem_instdir}
e5b264
%{gem_libdir}
e5b264
%exclude %{gem_cache}
e5b264
%{gem_spec}
e5b264
%doc %{gem_instdir}/LICENSE
e5b264
e5b264
%files doc
e5b264
%doc %{gem_docdir}
e5b264
%doc %{gem_instdir}/README.md
e5b264
%doc %{gem_instdir}/Performance.md
e5b264
%doc %{gem_instdir}/History.md
e5b264
%{gem_instdir}/%{gem_name}.gemspec
e5b264
%{gem_instdir}/Rakefile
e5b264
%{gem_instdir}/Gemfile
e5b264
%{gem_instdir}/test
e5b264
e5b264
%changelog
e5b264
* Mon Feb 02 2015 Vít Ondruch <vondruch@redhat.com> - 2.7.2-2
e5b264
- Enable test suite.
e5b264
e5b264
* Mon Jan 19 2015 Josef Stribny <jstribny@redhat.com> - 2.7.2-1
e5b264
- Update to 2.7.2
e5b264
e5b264
* Fri Mar 21 2014 Vít Ondruch <vondruch@redhat.com> - 2.6.4-4
e5b264
- Rebuid against new scl-utils to depend on -runtime package.
e5b264
  Resolves: rhbz#1069109
e5b264
e5b264
* Thu Oct 03 2013 Josef Stribny <jstribny@redhat.com> - 2.6.4-3
e5b264
- Rebuild for scl
e5b264
e5b264
* Thu Aug 08 2013 Josef Stribny <jstribny@redhat.com> - 2.6.4-2
e5b264
- Enable tests
e5b264
e5b264
* Wed Jul 31 2013 Josef Stribny <jstribny@redhat.com> - 2.6.4-1
e5b264
- Initial package