68 lines
1.7 KiB
RPMSpec
68 lines
1.7 KiB
RPMSpec
|
|
%global gem_name redis
|
||
|
|
Name: rubygem-%{gem_name}
|
||
|
|
Version: 4.0.1
|
||
|
|
Release: 1
|
||
|
|
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
|
||
|
|
# We will use this static file to start a testing redis server instance
|
||
|
|
Source1: redis-test.conf
|
||
|
|
BuildRequires: ruby ruby(release) rubygems-devel rubygem(test-unit) redis
|
||
|
|
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 -c -T
|
||
|
|
%gem_install -n %{SOURCE0}
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{gem_instdir}
|
||
|
|
cp -p %{SOURCE1} test/test.conf
|
||
|
|
redis-server test/test.conf
|
||
|
|
LANG=C.UTF-8
|
||
|
|
export SOCKET_PATH="test/db/redis.sock"
|
||
|
|
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||
|
|
kill -INT `cat test/db/redis.pid`
|
||
|
|
popd
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{gem_dir}
|
||
|
|
cp -a .%{gem_dir}/* \
|
||
|
|
%{buildroot}%{gem_dir}/
|
||
|
|
rm -r %{buildroot}%{gem_instdir}/test
|
||
|
|
|
||
|
|
%files
|
||
|
|
%dir %{gem_instdir}
|
||
|
|
%{gem_libdir}
|
||
|
|
%license %{gem_instdir}/LICENSE
|
||
|
|
%{gem_spec}
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%exclude %{gem_instdir}/.*
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
||
|
|
%doc %{gem_instdir}/README.md
|
||
|
|
%{gem_instdir}/%{gem_name}.gemspec
|
||
|
|
%{gem_instdir}/Gemfile
|
||
|
|
%{gem_instdir}/makefile
|
||
|
|
%{gem_instdir}/bors.toml
|
||
|
|
%{gem_instdir}/benchmarking/
|
||
|
|
%{gem_instdir}/examples/
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Tue Aug 18 2020 huangyangke <huangyangke@huawei.com> - 4.0.1-1
|
||
|
|
- package init
|