]> git.pld-linux.org Git - packages/redis.git/blob - redis.spec
- server has illegal instruction in sparc
[packages/redis.git] / redis.spec
1 # TODO
2 # - Check for status of man pages http://code.google.com/p/redis/issues/detail?id=202
3 #
4 # Conditional build:
5 %if "%{pld_release}" == "ac"
6 %bcond_with             tests           # build without tests
7 %else
8 %bcond_without  tests           # build without tests
9 %endif
10
11 Summary:        A persistent key-value database
12 Name:           redis
13 Version:        2.0.2
14 Release:        4
15 License:        BSD
16 Group:          Applications/Databases
17 URL:            http://code.google.com/p/redis/
18 Source0:        http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
19 # Source0-md5:  1658ab25161efcc0d0e98b4d1e38a985
20 Source1:        %{name}.logrotate
21 Source2:        %{name}.init
22 Patch0:         %{name}.conf.patch
23 BuildRequires:  rpm >= 4.4.9-56
24 BuildRequires:  rpmbuild(macros) >= 1.202
25 BuildRequires:  sed >= 4.0
26 %{?with_tests:BuildRequires:    tcl >= 8.5}
27 ExcludeArch:    sparc sparc64
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Redis is an advanced key-value store. It is similar to memcached but
32 the data set is not volatile, and values can be strings, exactly like
33 in memcached, but also lists, sets, and ordered sets. All this data
34 types can be manipulated with atomic operations to push/pop elements,
35 add/remove elements, perform server side union, intersection,
36 difference between sets, and so forth. Redis supports different kind
37 of sorting abilities.
38
39 %package server
40 Summary:        Persistent key-value database with network interface
41 Group:          Applications/Databases
42 Requires(post,preun):   /sbin/chkconfig
43 Requires(postun):       /usr/sbin/groupdel
44 Requires(postun):       /usr/sbin/userdel
45 Requires(pre):  /bin/id
46 Requires(pre):  /usr/bin/getgid
47 Requires(pre):  /usr/sbin/groupadd
48 Requires(pre):  /usr/sbin/useradd
49 Requires:       rc-scripts
50 Provides:       group(redis)
51 Provides:       user(redis)
52
53 %description server
54 Redis is a key-value database in a similar vein to memcache but the
55 dataset is non-volatile. Redis additionally provides native support
56 for atomically manipulating and querying data structures such as lists
57 and sets.
58
59 The dataset is stored entirely in memory and periodically flushed to
60 disk.
61
62 %package doc
63 Summary:        documentation for redis
64 Group:          Documentation
65
66 %description doc
67 HTML Documentation for Redis.
68
69 %prep
70 %setup -q
71 %patch0 -p1
72 # Remove integration tests
73 %{__sed} -i -e '/    execute_tests "integration\/replication"/d' tests/test_helper.tcl
74 %{__sed} -i -e '/    execute_tests "integration\/aof"/d' tests/test_helper.tcl
75
76 %build
77 %{__make} all \
78         DEBUG="" \
79         CC="%{__cc}" \
80         CFLAGS="%{rpmcflags} -std=c99"
81
82 %if %{with tests}
83 tclsh tests/test_helper.tcl
84 %endif
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 # Install binaries
89 install -p -D %{name}-benchmark $RPM_BUILD_ROOT%{_bindir}/%{name}-benchmark
90 install -p -D %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}-cli
91 install -p -D %{name}-check-aof $RPM_BUILD_ROOT%{_bindir}/%{name}-check-aof
92 install -p -D %{name}-check-dump $RPM_BUILD_ROOT%{_bindir}/%{name}-check-dump
93 install -p -D %{name}-server $RPM_BUILD_ROOT%{_sbindir}/%{name}-server
94 # Install misc other
95 install -p -D %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
96 install -p -D %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
97 install -p -D %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
98 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
99 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
100 install -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
101
102 %clean
103 rm -fr $RPM_BUILD_ROOT
104
105 %pre server
106 %groupadd -g 256 redis
107 %useradd -u 256 -g redis -d %{_sharedstatedir}/redis -s /sbin/nologin -c 'Redis Server' redis
108
109 %post server
110 /sbin/chkconfig --add redis
111 %service redis restart
112
113 %preun server
114 if [ "$1" = 0 ]; then
115         %service redis stop
116         /sbin/chkconfig --del redis
117 fi
118
119 %postun server
120 if [ "$1" = "0" ]; then
121         %userremove redis
122         %groupremove redis
123 fi
124
125 %files
126 %defattr(644,root,root,755)
127 %doc COPYING 00-RELEASENOTES BUGS Changelog README TODO
128 %attr(755,root,root) %{_bindir}/redis-benchmark
129 %attr(755,root,root) %{_bindir}/redis-check-aof
130 %attr(755,root,root) %{_bindir}/redis-check-dump
131 %attr(755,root,root) %{_bindir}/redis-cli
132
133 %files server
134 %defattr(644,root,root,755)
135 %config(noreplace) %{_sysconfdir}/%{name}.conf
136 %attr(754,root,root) /etc/rc.d/init.d/%{name}
137 %attr(755,root,root) %{_sbindir}/redis-server
138 %config(noreplace) /etc/logrotate.d/%{name}
139 %dir %attr(755,redis,root) %{_localstatedir}/lib/%{name}
140 %dir %attr(755,redis,root) %{_localstatedir}/log/%{name}
141 %dir %attr(755,redis,root) %{_localstatedir}/run/%{name}
142
143 %files doc
144 %defattr(644,root,root,755)
145 %doc doc/*
This page took 0.315495 seconds and 4 git commands to generate.