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