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