]>
Commit | Line | Data |
---|---|---|
c55b5bfc ER |
1 | # TODO |
2 | # - memcached has -P option for pid, but root privs are dropped before | |
3 | # pid is written, so either run memcached as new uid or hack code to | |
4 | # write pidfile before changing uid, as rc-script removes pid on | |
5 | # shutdown anyway. | |
56126164 | 6 | Summary: A high-performance, distributed memory object caching system |
ee5b4f18 | 7 | Summary(pl.UTF-8): Rozproszony, wysokiej wydajności system cache'owania obiektów |
56126164 | 8 | Name: memcached |
7e73948c | 9 | Version: 1.2.4 |
f8a9b048 | 10 | Release: 2 |
ba4bd57b | 11 | License: BSD |
56126164 MM |
12 | Group: Networking/Daemons |
13 | Source0: http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz | |
7e73948c | 14 | # Source0-md5: b80db034f951b296b2672b243022c061 |
3a964b8a AM |
15 | Source1: %{name}.init |
16 | Source2: %{name}.sysconfig | |
56126164 | 17 | URL: http://www.danga.com/memcached/ |
aebd8fee | 18 | BuildRequires: autoconf |
56126164 | 19 | BuildRequires: automake |
e4a0c888 | 20 | BuildRequires: libevent-devel >= 1.1 |
3a5da022 ER |
21 | BuildRequires: rpmbuild(macros) >= 1.268 |
22 | Requires(post,preun): /sbin/chkconfig | |
23 | Requires: rc-scripts | |
56126164 MM |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | A high-performance, distributed memory object caching system. | |
28 | ||
1e501250 JR |
29 | %description -l pl.UTF-8 |
30 | Rozproszony, wysokiej wydajności system cache'owania obiektów. | |
56126164 MM |
31 | |
32 | %prep | |
33 | %setup -q | |
34 | ||
35 | %build | |
36 | %{__aclocal} | |
37 | %{__autoconf} | |
38 | %{__autoheader} | |
39 | %{__automake} | |
40 | %configure | |
41 | %{__make} | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
3a964b8a | 45 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
3f79a4b3 | 46 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1} |
3a964b8a | 47 | |
3f79a4b3 | 48 | install memcached $RPM_BUILD_ROOT%{_sbindir} |
56126164 MM |
49 | install doc/memcached.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
50 | ||
3a964b8a AM |
51 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
52 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
53 | ||
54 | %post | |
55 | /sbin/chkconfig --add %{name} | |
56 | %service %{name} restart | |
57 | ||
58 | %preun | |
59 | if [ "$1" = "0" ]; then | |
60 | %service -q %{name} stop | |
61 | /sbin/chkconfig --del %{name} | |
62 | fi | |
63 | ||
56126164 MM |
64 | %clean |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc AUTHORS README TODO doc/*.txt | |
2f65b0fc | 70 | %attr(755,root,root) %{_sbindir}/* |
56126164 | 71 | %{_mandir}/man1/* |
3a964b8a AM |
72 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
73 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |