2 # - register user/gid, pld initscript
3 # - Check for status of man pages http://code.google.com/p/redis/issues/detail?id=202
6 %bcond_without tests # build without tests
8 Summary: A persistent key-value database
13 Group: Applications/Databases
14 URL: http://code.google.com/p/redis/
15 Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
16 # Source0-md5: 1658ab25161efcc0d0e98b4d1e38a985
17 Source1: %{name}.logrotate
19 Patch0: %{name}-redis.conf.patch
20 BuildRequires: sed >= 4.0
21 %{?with_tests:BuildRequires: tcl}
22 Requires(post): /sbin/chkconfig
23 Requires(preun): /sbin/chkconfig
24 Requires(preun): rc-scripts
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Redis is an advanced key-value store. It is similar to memcached but
29 the data set is not volatile, and values can be strings, exactly like
30 in memcached, but also lists, sets, and ordered sets. All this data
31 types can be manipulated with atomic operations to push/pop elements,
32 add/remove elements, perform server side union, intersection,
33 difference between sets, and so forth. Redis supports different kind
39 # Remove integration tests
40 %{__sed} -i -e '/ execute_tests "integration\/replication"/d' tests/test_helper.tcl
41 %{__sed} -i -e '/ execute_tests "integration\/aof"/d' tests/test_helper.tcl
47 CFLAGS="%{rpmcflags} -std=c99"
50 tclsh tests/test_helper.tcl
54 rm -rf $RPM_BUILD_ROOT
56 install -p -D %{name}-benchmark $RPM_BUILD_ROOT%{_bindir}/%{name}-benchmark
57 install -p -D %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}-cli
58 install -p -D %{name}-check-aof $RPM_BUILD_ROOT%{_bindir}/%{name}-check-aof
59 install -p -D %{name}-check-dump $RPM_BUILD_ROOT%{_bindir}/%{name}-check-dump
60 install -p -D %{name}-server $RPM_BUILD_ROOT%{_sbindir}/%{name}-server
62 install -p -D %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
63 install -p -D %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
64 install -p -D %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
65 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
66 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
67 install -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
70 rm -fr $RPM_BUILD_ROOT
73 /sbin/chkconfig --add redis
76 %groupadd -g 256 redis
77 %useradd -u 245 -g redis -d %{_sharedstatedir}/redis -s /sbin/nologin -c 'Redis Server' redis
82 /sbin/chkconfig --del redis
86 %defattr(644,root,root,755)
87 %doc 00-RELEASENOTES BUGS COPYING Changelog README TODO doc/
88 %config(noreplace) %{_sysconfdir}/%{name}.conf
89 %attr(754,root,root) /etc/rc.d/init.d/%{name}
90 %attr(755,root,root) %{_bindir}/%{name}-*
91 %attr(755,root,root) %{_sbindir}/%{name}-*
92 %config(noreplace) /etc/logrotate.d/%{name}
93 %dir %attr(755,redis,root) %{_localstatedir}/lib/%{name}
94 %dir %attr(755,redis,root) %{_localstatedir}/log/%{name}
95 %dir %attr(755,redis,root) %{_localstatedir}/run/%{name}