2 # - release notes: https://github.com/memcached/memcached/wiki/ReleaseNotes
4 # - fix x32 build failure:
5 #crawler.c: In function 'crawler_metadump_eval':
6 #crawler.c:229:13: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'time_t {aka long long int}' [-Wformat=]
7 # "key=%s exp=%ld la=%llu cas=%llu fetch=%s\n",
9 #crawler.c:229:13: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'time_t {aka long long int}' [-Wformat=]
11 Summary: A high-performance, distributed memory object caching system
12 Summary(pl.UTF-8): Rozproszony, wysokiej wydajności system cache'owania obiektów
17 Group: Networking/Daemons
18 Source0: http://www.memcached.org/files/%{name}-%{version}.tar.gz
19 # Source0-md5: 4b64296ea0eeccdee9168c035e0488ab
21 Source2: %{name}.sysconfig
22 Source3: %{name}.tmpfiles
23 URL: https://memcached.org/about
24 BuildRequires: autoconf
25 BuildRequires: automake
26 BuildRequires: libevent-devel >= 1.1
27 BuildRequires: rpmbuild(macros) >= 1.268
28 BuildRequires: sed >= 4.0
29 Requires(post,preun): /sbin/chkconfig
30 Requires(postun): /usr/sbin/groupdel
31 Requires(postun): /usr/sbin/userdel
32 Requires(pre): /bin/id
33 Requires(pre): /usr/bin/getgid
34 Requires(pre): /usr/sbin/groupadd
35 Requires(pre): /usr/sbin/useradd
36 Requires: rc-scripts >= 0.4.1.23
37 Provides: group(memcached)
38 Provides: user(memcached)
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define _bindir %{_sbindir}
44 A high-performance, distributed memory object caching system.
46 %description -l pl.UTF-8
47 Rozproszony, wysokiej wydajności system cache'owania obiektów.
50 Summary: Files needed for development using memcached protocol
51 Group: Development/Libraries
52 # does not require base
55 Install memcached-devel if you are developing C/C++ applications that
56 require access to the memcached binary include files.
61 sed -nie '1,/^$/p' ChangeLog
64 %{__sed} -i -e 's/-Werror//' configure.ac
73 %{?with_repcached:--enable-replication} \
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/memcached} \
80 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
83 INSTALL="%{__install} -p" \
84 DESTDIR=$RPM_BUILD_ROOT
86 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
87 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
88 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
91 %groupadd -g 209 %{name}
92 %useradd -u 209 -d /usr/share/empty -g %{name} -c "Memcached Daemon" %{name}
95 /sbin/chkconfig --add %{name}
96 %service %{name} restart
99 if [ "$1" = "0" ]; then
100 %service -q %{name} stop
101 /sbin/chkconfig --del %{name}
105 if [ "$1" = "0" ]; then
111 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %doc AUTHORS README.md ChangeLog doc/*.txt
116 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
117 %attr(754,root,root) /etc/rc.d/init.d/%{name}
118 %attr(755,root,root) %{_sbindir}/%{name}
119 %{_mandir}/man1/memcached.1*
120 %dir %attr(770,root,memcached) /var/run/memcached
121 %{systemdtmpfilesdir}/%{name}.conf
124 %defattr(644,root,root,755)
125 %{_includedir}/%{name}