2 # - Check for status of man pages http://code.google.com/p/redis/issues/detail?id=202
5 %if "%{pld_release}" == "ac"
6 %bcond_with tests # build without tests
7 %bcond_with perftools # google perftools
9 %bcond_without tests # build without tests
10 %bcond_without perftools # google perftools
13 %ifnarch %{ix86} %{x8664} ppc
14 # available only on selected architectures
15 %undefine with_perftools
18 Summary: A persistent key-value database
23 Group: Applications/Databases
24 URL: http://www.redis.io/
25 Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
26 # Source0-md5: 3605e3d4c9465fdfefa2e96f3a408ef5
27 Source1: %{name}.logrotate
29 Patch0: %{name}.conf.patch
30 %{?with_perftools:BuildRequires: google-perftools-devel}
31 BuildRequires: rpm >= 4.4.9-56
32 BuildRequires: rpmbuild(macros) >= 1.202
33 BuildRequires: sed >= 4.0
34 %{?with_tests:BuildRequires: tcl >= 8.5}
35 ExcludeArch: sparc sparc64 alpha
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Redis is an advanced key-value store. It is similar to memcached but
40 the data set is not volatile, and values can be strings, exactly like
41 in memcached, but also lists, sets, and ordered sets. All this data
42 types can be manipulated with atomic operations to push/pop elements,
43 add/remove elements, perform server side union, intersection,
44 difference between sets, and so forth. Redis supports different kind
48 Summary: Persistent key-value database with network interface
49 Group: Applications/Databases
50 Requires(post,preun): /sbin/chkconfig
51 Requires(postun): /usr/sbin/groupdel
52 Requires(postun): /usr/sbin/userdel
53 Requires(pre): /bin/id
54 Requires(pre): /usr/bin/getgid
55 Requires(pre): /usr/sbin/groupadd
56 Requires(pre): /usr/sbin/useradd
58 Provides: group(redis)
62 Redis is a key-value database in a similar vein to memcache but the
63 dataset is non-volatile. Redis additionally provides native support
64 for atomically manipulating and querying data structures such as lists
67 The dataset is stored entirely in memory and periodically flushed to
71 Summary: documentation for redis
75 HTML Documentation for Redis.
80 # Remove integration tests
81 %{__sed} -i -e '/ execute_tests "integration\/replication"/d' tests/test_helper.tcl
82 %{__sed} -i -e '/ execute_tests "integration\/aof"/d' tests/test_helper.tcl
87 CFLAGS="%{rpmcflags} -std=c99" \
94 tclsh tests/test_helper.tcl
98 rm -rf $RPM_BUILD_ROOT
100 PREFIX=$RPM_BUILD_ROOT%{_prefix}
102 # Fix non-standard-executable-perm error
103 chmod a+x $RPM_BUILD_ROOT%{_bindir}/%{name}-*
105 # Ensure redis-server location doesn't change
106 install -d $RPM_BUILD_ROOT%{_sbindir}
107 mv $RPM_BUILD_ROOT%{_bindir}/%{name}-server $RPM_BUILD_ROOT%{_sbindir}/%{name}-server
110 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d}
111 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
112 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
113 install -p -D %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
114 install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib,log,run}/%{name}
117 rm -rf $RPM_BUILD_ROOT
120 %groupadd -g 256 redis
121 %useradd -u 256 -g redis -d %{_sharedstatedir}/redis -s /sbin/nologin -c 'Redis Server' redis
124 /sbin/chkconfig --add redis
125 %service redis restart
128 if [ "$1" = 0 ]; then
130 /sbin/chkconfig --del redis
134 if [ "$1" = "0" ]; then
140 %defattr(644,root,root,755)
141 %doc COPYING 00-RELEASENOTES BUGS Changelog README TODO
142 %attr(755,root,root) %{_bindir}/redis-benchmark
143 %attr(755,root,root) %{_bindir}/redis-check-aof
144 %attr(755,root,root) %{_bindir}/redis-check-dump
145 %attr(755,root,root) %{_bindir}/redis-cli
148 %defattr(644,root,root,755)
149 %config(noreplace) %{_sysconfdir}/%{name}.conf
150 %attr(754,root,root) /etc/rc.d/init.d/%{name}
151 %attr(755,root,root) %{_sbindir}/redis-server
152 %config(noreplace) /etc/logrotate.d/%{name}
153 %dir %attr(755,redis,root) %{_localstatedir}/lib/%{name}
154 %dir %attr(755,redis,root) %{_localstatedir}/log/%{name}
155 %dir %attr(755,redis,root) %{_localstatedir}/run/%{name}
158 %defattr(644,root,root,755)