%global gem_name redis Name: rubygem-%{gem_name} Version: 4.1.1 Release: 2%{?dist} Summary: A Ruby client library for Redis License: MIT URL: https://github.com/redis/redis-rb Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone https://github.com/redis/redis-rb.git && cd redis-rb # git archive -v -o redis-rb-4.1.1-tests.tar.gz v4.1.1 makefile test/ Source1: %{gem_name}-rb-%{version}-tests.tar.gz BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildRequires: rubygem(mocha) BuildRequires: rubygem(test-unit) BuildRequires: %{_bindir}/redis-server BuildArch: noarch %description A Ruby client that tries to match Redis' API one-to-one, while still providing an idiomatic interface. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b 1 %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.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 %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} cp -a %{_builddir}/{makefile,test} . # Get rid of Bundler. sed -i 's/bundle exec //' makefile # We are using packaged Redis, so provide just dummy Redis build script. mkdir bin echo '#!/usr/bin/sh' > bin/build chmod a+x bin/build # Set locale because two tests fail in mock. # https://github.com/redis/redis-rb/issues/345 LANG=C.UTF-8 # test_bzpopmax(TestBlockingCommands) test fails unless timeout is increased. # https://github.com/redis/redis-rb/pull/794 make TIMEOUT=15 BINARY=$(which redis-server) REDIS_CLIENT=$(which redis-cli) BUILD_DIR='${TMP}' popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %changelog * Fri Jul 26 2019 Fedora Release Engineering - 4.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Thu May 09 2019 Vít Ondruch - 4.1.1-1 - Update to redis 4.1.1. * Sat Feb 02 2019 Fedora Release Engineering - 4.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 4.0.1-3 - Use C.UTF-8 locale See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot * Sat Jul 14 2018 Fedora Release Engineering - 4.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Mon Apr 23 2018 Pavel Valena - 4.0.1-1 - Update to redis 4.0.1. * Fri Feb 09 2018 Fedora Release Engineering - 3.2.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 3.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 3.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Feb 08 2016 Greg Hellings - 3.2.2-2 - Update for rpmlint check - Remove tests * Mon Feb 08 2016 Greg Hellings - 3.2.2-1 - New upstream * Thu Feb 04 2016 Fedora Release Engineering - 3.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 3.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Feb 15 2015 Ken Dreyer - 3.2.1-1 - Update to 3.2.1 (RHBZ #1192389) - Remove Fedora 19 compatibility macros - Use static test.conf, since upstream uses a dynamic ERB template now - Correct comment about IPv6 support * Mon Dec 15 2014 Ken Dreyer - 3.2.0-1 - Update to 3.2.0 (RHBZ #1173070) - Drop unneeded BRs - Use %%license macro - Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1 - Unconditionally pass tests for now (RHBZ #1173070) * Mon Jun 09 2014 Ken Dreyer - 3.1.0-1 - Update to 3.1.0 - Remove gem2rpm comment - Patch for Minitest 5 * Sun Jun 08 2014 Fedora Release Engineering - 3.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Feb 24 2014 Achilleas Pipinellis - 3.0.7-1 - Update to 3.0.7 * Tue Sep 03 2013 Axilleas Pipinellis - 3.0.4-3 - Move %%exclude .gitignore to -doc - Reference to redis related bug * Thu Jun 27 2013 Axilleas Pipinellis - 3.0.4-2 - Fix failing test - Remove redis from Requires - Exclude dot file * Sun Jun 23 2013 Axilleas Pipinellis - 3.0.4-1 - Initial package