]> git.pld-linux.org Git - packages/memcached.git/blob - memcached.spec
- rebuild with libevent 2.1.11
[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 #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",
8 #             ^
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=]
10
11 Summary:        A high-performance, distributed memory object caching system
12 Summary(pl.UTF-8):      Rozproszony, wysokiej wydajności system cache'owania obiektów
13 Name:           memcached
14 Version:        1.5.20
15 Release:        2
16 License:        BSD
17 Group:          Networking/Daemons
18 Source0:        http://www.memcached.org/files/%{name}-%{version}.tar.gz
19 # Source0-md5:  4b64296ea0eeccdee9168c035e0488ab
20 Source1:        %{name}.init
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)
40
41 %define         _bindir %{_sbindir}
42
43 %description
44 A high-performance, distributed memory object caching system.
45
46 %description -l pl.UTF-8
47 Rozproszony, wysokiej wydajności system cache'owania obiektów.
48
49 %package devel
50 Summary:        Files needed for development using memcached protocol
51 Group:          Development/Libraries
52 # does not require base
53
54 %description devel
55 Install memcached-devel if you are developing C/C++ applications that
56 require access to the memcached binary include files.
57
58 %prep
59 %setup -q
60
61 sed -nie '1,/^$/p' ChangeLog
62
63 %ifarch x32
64 %{__sed} -i -e 's/-Werror//' configure.ac
65 %endif
66
67 %build
68 %{__aclocal}
69 %{__autoconf}
70 %{__autoheader}
71 %{__automake}
72 %configure \
73         %{?with_repcached:--enable-replication} \
74         --disable-coverage
75 %{__make}
76
77 %install
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}
81
82 %{__make} install \
83         INSTALL="%{__install} -p" \
84         DESTDIR=$RPM_BUILD_ROOT
85
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
89
90 %pre
91 %groupadd -g 209 %{name}
92 %useradd -u 209 -d /usr/share/empty -g %{name} -c "Memcached Daemon" %{name}
93
94 %post
95 /sbin/chkconfig --add %{name}
96 %service %{name} restart
97
98 %preun
99 if [ "$1" = "0" ]; then
100         %service -q %{name} stop
101         /sbin/chkconfig --del %{name}
102 fi
103
104 %postun
105 if [ "$1" = "0" ]; then
106         %userremove %{name}
107         %groupremove %{name}
108 fi
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %files
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
122
123 %files devel
124 %defattr(644,root,root,755)
125 %{_includedir}/%{name}
This page took 0.404899 seconds and 3 git commands to generate.