]> git.pld-linux.org Git - packages/memcached.git/blob - memcached.spec
- up to 1.4.11
[packages/memcached.git] / memcached.spec
1 #
2 # Conditional build:
3 %bcond_with             repcached               # repcached support, http://repcached.lab.klab.org/
4
5 Summary:        A high-performance, distributed memory object caching system
6 Summary(pl.UTF-8):      Rozproszony, wysokiej wydajności system cache'owania obiektów
7 Name:           memcached
8 Version:        1.4.11
9 Release:        1
10 License:        BSD
11 Group:          Networking/Daemons
12 Source0:        http://memcached.googlecode.com/files/%{name}-%{version}.tar.gz
13 # Source0-md5:  50ee313639531d4d2f8eb9c688f58948
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 URL:            http://memcached.org/
17 Patch0:         repcached.patch
18 BuildRequires:  autoconf
19 BuildRequires:  automake
20 BuildRequires:  libevent-devel >= 1.1
21 BuildRequires:  rpmbuild(macros) >= 1.268
22 Requires(post,preun):   /sbin/chkconfig
23 Requires(postun):       /usr/sbin/groupdel
24 Requires(postun):       /usr/sbin/userdel
25 Requires(pre):  /bin/id
26 Requires(pre):  /usr/bin/getgid
27 Requires(pre):  /usr/sbin/groupadd
28 Requires(pre):  /usr/sbin/useradd
29 Requires:       rc-scripts >= 0.4.1.23
30 Provides:       group(memcached)
31 Provides:       user(memcached)
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 A high-performance, distributed memory object caching system.
36
37 %description -l pl.UTF-8
38 Rozproszony, wysokiej wydajności system cache'owania obiektów.
39
40 %prep
41 %setup -q
42 %{?with_repcached:%patch0 -p1}
43
44 %build
45 %{__aclocal}
46 %{__autoconf}
47 %{__autoheader}
48 %{__automake}
49 %configure \
50         %{?with_repcached:--enable-replication} \
51         --disable-coverage
52 %{__make}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/memcached} \
57         $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1}
58
59 install -p memcached $RPM_BUILD_ROOT%{_sbindir}
60 cp -p doc/memcached.1 $RPM_BUILD_ROOT%{_mandir}/man1
61
62 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
63 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
64
65 %pre
66 %groupadd -g 209 %{name}
67 %useradd -u 209 -d /usr/share/empty -g %{name} -c "Memcached User" %{name}
68
69 %post
70 /sbin/chkconfig --add %{name}
71 %service %{name} restart
72
73 %preun
74 if [ "$1" = "0" ]; then
75         %service -q %{name} stop
76         /sbin/chkconfig --del %{name}
77 fi
78
79 %postun
80 if [ "$1" = "0" ]; then
81         %userremove %{name}
82         %groupremove %{name}
83 fi
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc AUTHORS README doc/*.txt
91 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
92 %attr(754,root,root) /etc/rc.d/init.d/%{name}
93 %attr(755,root,root) %{_sbindir}/%{name}
94 %{_mandir}/man1/memcached.1*
95 %dir %attr(770,root,memcached) /var/run/memcached
This page took 0.039781 seconds and 4 git commands to generate.