redis/redis.spec

86 lines
2.9 KiB
RPMSpec
Raw Normal View History

2012-10-05 06:59:54 +04:00
# Check for status of man pages
# http://code.google.com/p/redis/issues/detail?id=202
Name: redis
2015-07-25 14:59:25 +03:00
Version: 2.8.13
Release: 1
2012-10-05 06:59:54 +04:00
Summary: A persistent key-value database
Group: Databases
License: BSD
URL: http://redis.io/
Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: %{name}.logrotate
Source2: %{name}.tmpfiles
Source3: %{name}.service
# Update configuration for Fedora
2015-07-25 14:59:25 +03:00
#Patch0: %{name}-2.0.0-redis.conf.patch
Patch0: redis-2.8.3-shared.patch
Patch1: redis-2.8.17-config.patch
BuildRequires: tcl >= 8.5
BuildRequires: jemalloc-devel
2012-10-05 06:59:54 +04:00
Requires(post): rpm-helper >= 0.24.1-1
Requires(preun): rpm-helper >= 0.24.1-1
2012-02-01 20:01:41 +04:00
%description
2012-06-01 05:30:33 +04:00
Redis is an advanced key-value store.
2012-10-05 06:59:54 +04:00
It is similar to memcached but the data set is not
volatile, and values can be strings, exactly like in
memcached, but also lists, sets, and ordered sets.
All this data types can be manipulated with atomic operations
to push/pop elements, add/remove elements, perform server side
union, intersection, difference between sets, and so forth.
Redis supports different kind of sorting abilities.
2012-02-01 20:01:41 +04:00
%prep
%setup -q
2015-07-25 14:59:25 +03:00
%apply_patches
sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' deps/lua/src/Makefile
sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile
2012-02-01 20:01:41 +04:00
%build
2015-07-25 14:59:25 +03:00
%make CC="%{__cc}" CFLAGS="%{optflags}" AR="%{__ar} rcu" JEMALLOC_SHARED=yes
2012-02-01 20:01:41 +04:00
%check
2012-10-05 06:59:54 +04:00
tclsh tests/test_helper.tcl
2012-02-01 20:01:41 +04:00
2012-06-01 05:30:33 +04:00
%install
2012-10-05 06:59:54 +04:00
# Install binaries
2015-07-25 14:59:25 +03:00
install -p -D -m 0755 src/%{name}-benchmark %{buildroot}%{_bindir}/%{name}-benchmark
install -p -D -m 0755 src/%{name}-cli %{buildroot}%{_bindir}/%{name}-cli
install -p -D -m 0755 src/%{name}-check-aof %{buildroot}%{_bindir}/%{name}-check-aof
install -p -D -m 0755 src/%{name}-check-dump %{buildroot}%{_bindir}/%{name}-check-dump
install -p -D -m 0755 src/%{name}-server %{buildroot}%{_sbindir}/%{name}-server
2012-06-01 05:30:33 +04:00
# Install misc other
2015-07-25 14:59:25 +03:00
install -p -D -m 0644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -p -D -m 0755 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
2012-06-01 05:30:33 +04:00
2015-07-25 14:59:25 +03:00
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name}
install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
2012-06-01 05:30:33 +04:00
2012-02-01 20:01:41 +04:00
%pre
2012-10-05 06:59:54 +04:00
%_pre_useradd redis %{_sharedstatedir}/redis /sbin/nologin
2012-02-01 20:01:41 +04:00
%post
2012-10-05 06:59:54 +04:00
systemd-tmpfiles --create %{name}.conf
%_post_service redis
2012-02-01 20:01:41 +04:00
%preun
2012-10-05 06:59:54 +04:00
%_preun_service redis
%postun
%_postun_userdel redis
2012-02-01 20:01:41 +04:00
%files
2012-10-05 06:59:54 +04:00
%doc 00-RELEASENOTES BUGS COPYING README
2012-02-01 20:01:41 +04:00
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
2012-06-01 05:30:33 +04:00
%config(noreplace) %{_sysconfdir}/%{name}.conf
%dir %attr(0755, redis, root) %{_localstatedir}/lib/%{name}
%dir %attr(0755, redis, root) %{_localstatedir}/log/%{name}
%{_bindir}/%{name}-*
%{_sbindir}/%{name}-*
2012-10-05 06:59:54 +04:00
%{_prefix}/lib/tmpfiles.d/%{name}.conf
2012-06-01 05:30:33 +04:00
%{_unitdir}/%{name}.service