comparison memcached.spec @ 0:30782bb1fc04 MEMCACHED_1_2_3

memcached-1.2.3
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 23 Sep 2007 03:58:34 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:30782bb1fc04
1 Name: memcached
2 Version: 1.2.2
3 Release: 5%{?dist}
4 Summary: High Performance, Distributed Memory Object Cache
5
6 Group: System Environment/Daemons
7 License: BSD
8 URL: http://www.danga.com/memcached/
9 Source0: http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12 BuildRequires: libevent-devel
13 BuildRequires: perl(Test::More)
14 Requires: initscripts
15 Requires(post): /sbin/chkconfig
16 Requires(preun): /sbin/chkconfig, /sbin/service
17 Requires(postun): /sbin/service
18
19 %description
20 memcached is a high-performance, distributed memory object caching
21 system, generic in nature, but intended for use in speeding up dynamic
22 web applications by alleviating database load.
23
24 %prep
25 %setup -q
26
27
28 %build
29 %configure --enable-threads
30
31 make %{?_smp_mflags}
32
33 %check
34 make test
35
36 %install
37 rm -rf %{buildroot}
38 make install DESTDIR=%{buildroot}
39
40 # remove memcached-debug
41 rm -f %{buildroot}/%{_bindir}/memcached-debug
42
43 # Perl script for monitoring memcached
44 install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
45
46 # Init script
47 install -Dp -m0755 scripts/memcached.sysv %{buildroot}%{_initrddir}/memcached
48
49 # Default configs
50 mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
51 cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
52 PORT="11211"
53 USER="nobody"
54 MAXCONN="1024"
55 CACHESIZE="64"
56 OPTIONS=""
57 EOF
58
59 # pid directory
60 mkdir -p %{buildroot}/%{_localstatedir}/run/memcached
61
62 %clean
63 rm -rf %{buildroot}
64
65
66 %post
67 /sbin/chkconfig --add %{name}
68
69 %preun
70 if [ "$1" = 0 ] ; then
71 /sbin/service %{name} stop > /dev/null 2>&1
72 /sbin/chkconfig --del %{name}
73 fi
74 exit 0
75
76 %postun
77 if [ "$1" -ge 1 ]; then
78 /sbin/service %{name} condrestart > /dev/null 2>&1
79 fi
80 exit 0
81
82
83 %files
84 %defattr(-,root,root,-)
85 %doc AUTHORS ChangeLog COPYING NEWS README TODO doc/CONTRIBUTORS doc/*.txt
86 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
87
88 %dir %attr(750,nobody,nobody) %{_localstatedir}/run/memcached
89 %{_bindir}/memcached-tool
90 %{_bindir}/memcached
91 %{_mandir}/man1/memcached.1*
92 %{_initrddir}/memcached
93
94
95 %changelog
96 * Wed Jul 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
97 - Use /var/run/memcached/ directory to hold PID file
98
99 * Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
100 - Remove tabs from spec file, rpmlint reports no more errors
101
102 * Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
103 - Enable build-time regression tests
104 - add dependency on initscripts
105 - remove memcached-debug (not needed in dist)
106 - above suggestions from Bernard Johnson
107
108 * Mon May 7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
109 - Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
110
111 * Fri May 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
112 - Initial spec file created via rpmdev-newspec