]> git.pld-linux.org Git - packages/memcached.git/blame - memcached.spec
- rebuild with libevent 2.1.9
[packages/memcached.git] / memcached.spec
CommitLineData
f1cd2118 1# NOTE
e63ff5d7 2# - release notes: https://github.com/memcached/memcached/wiki/ReleaseNotes
3980cd45
ER
3# TODO
4# - fix x32 build failure:
70b0f7ee
ER
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=]
f1cd2118 10
e355c174
ER
11# Conditional build:
12%bcond_with repcached # repcached support, http://repcached.lab.klab.org/
13
56126164 14Summary: A high-performance, distributed memory object caching system
ee5b4f18 15Summary(pl.UTF-8): Rozproszony, wysokiej wydajności system cache'owania obiektów
56126164 16Name: memcached
e63ff5d7 17Version: 1.4.33
040242e9 18Release: 2
ba4bd57b 19License: BSD
56126164 20Group: Networking/Daemons
5628a203 21Source0: http://www.memcached.org/files/%{name}-%{version}.tar.gz
e63ff5d7 22# Source0-md5: 2d7f6476283cd36e21e521d901d37a8f
3a964b8a
AM
23Source1: %{name}.init
24Source2: %{name}.sysconfig
d168c3ca 25Source3: %{name}.tmpfiles
b63b53d3 26URL: http://memcached.org/
e355c174 27Patch0: repcached.patch
aebd8fee 28BuildRequires: autoconf
56126164 29BuildRequires: automake
e4a0c888 30BuildRequires: libevent-devel >= 1.1
3a5da022 31BuildRequires: rpmbuild(macros) >= 1.268
f1cd2118 32BuildRequires: sed >= 4.0
3a5da022 33Requires(post,preun): /sbin/chkconfig
371f8914
ER
34Requires(postun): /usr/sbin/groupdel
35Requires(postun): /usr/sbin/userdel
36Requires(pre): /bin/id
37Requires(pre): /usr/bin/getgid
38Requires(pre): /usr/sbin/groupadd
39Requires(pre): /usr/sbin/useradd
ab340080 40Requires: rc-scripts >= 0.4.1.23
371f8914
ER
41Provides: group(memcached)
42Provides: user(memcached)
56126164
MM
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
947a497d
ER
45%define _bindir %{_sbindir}
46
56126164
MM
47%description
48A high-performance, distributed memory object caching system.
49
1e501250
JR
50%description -l pl.UTF-8
51Rozproszony, wysokiej wydajności system cache'owania obiektów.
56126164 52
947a497d
ER
53%package devel
54Summary: Files needed for development using memcached protocol
55Group: Development/Libraries
56# does not require base
57
58%description devel
59Install memcached-devel if you are developing C/C++ applications that
60require access to the memcached binary include files.
61
56126164
MM
62%prep
63%setup -q
df9e54d9 64%{?with_repcached:%patch0 -p1}
56126164 65
f1cd2118
ER
66sed -nie '1,/^$/p' ChangeLog
67
70b0f7ee
ER
68%ifarch x32
69%{__sed} -i -e 's/-Werror//' configure.ac
70%endif
71
56126164
MM
72%build
73%{__aclocal}
74%{__autoconf}
75%{__autoheader}
76%{__automake}
1856e00f 77%configure \
e355c174 78 %{?with_repcached:--enable-replication} \
1856e00f 79 --disable-coverage
56126164
MM
80%{__make}
81
82%install
83rm -rf $RPM_BUILD_ROOT
df9e54d9 84install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/memcached} \
f1cd2118 85 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
3a964b8a 86
947a497d
ER
87%{__make} install \
88 INSTALL="%{__install} -p" \
89 DESTDIR=$RPM_BUILD_ROOT
56126164 90
e355c174 91install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
df9e54d9 92cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
947a497d 93cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
d168c3ca 94
371f8914
ER
95%pre
96%groupadd -g 209 %{name}
68d94add 97%useradd -u 209 -d /usr/share/empty -g %{name} -c "Memcached Daemon" %{name}
371f8914 98
3a964b8a
AM
99%post
100/sbin/chkconfig --add %{name}
101%service %{name} restart
102
103%preun
104if [ "$1" = "0" ]; then
105 %service -q %{name} stop
106 /sbin/chkconfig --del %{name}
107fi
108
371f8914
ER
109%postun
110if [ "$1" = "0" ]; then
111 %userremove %{name}
112 %groupremove %{name}
113fi
114
56126164
MM
115%clean
116rm -rf $RPM_BUILD_ROOT
117
118%files
119%defattr(644,root,root,755)
f1cd2118 120%doc AUTHORS README.md ChangeLog doc/*.txt
3a964b8a 121%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
371f8914
ER
122%attr(754,root,root) /etc/rc.d/init.d/%{name}
123%attr(755,root,root) %{_sbindir}/%{name}
124%{_mandir}/man1/memcached.1*
125%dir %attr(770,root,memcached) /var/run/memcached
f1cd2118 126%{systemdtmpfilesdir}/%{name}.conf
947a497d
ER
127
128%files devel
129%defattr(644,root,root,755)
130%{_includedir}/%{name}
This page took 0.048494 seconds and 4 git commands to generate.