Remove how use instance (keep API intact)
[m6w6/libmemcached] / memcached / memcached.spec.in
1 Name: memcached
2 Version: @VERSION@
3 Release: @RELEASE@%{?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://memcached.googlecode.com/files/%{name}-@FULLVERSION@.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12 BuildRequires: libevent-devel
13 BuildRequires: perl(Test::More)
14 BuildRequires: /usr/bin/prove
15 Requires: initscripts
16 Requires(post): /sbin/chkconfig
17 Requires(preun): /sbin/chkconfig, /sbin/service
18 Requires(postun): /sbin/service
19
20 %description
21 memcached is a high-performance, distributed memory object caching
22 system, generic in nature, but intended for use in speeding up dynamic
23 web applications by alleviating database load.
24
25 %prep
26 %setup -q -n %{name}-@FULLVERSION@
27
28
29 %build
30 %configure
31
32 make %{?_smp_mflags}
33
34 %check
35 make test
36
37 %install
38 rm -rf %{buildroot}
39 make install DESTDIR=%{buildroot}
40
41 # remove memcached-debug
42 rm -f %{buildroot}/%{_bindir}/memcached-debug
43
44 # Perl script for monitoring memcached
45 install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
46
47 # Init script
48 install -Dp -m0755 scripts/memcached.sysv %{buildroot}%{_initrddir}/memcached
49
50 # Default configs
51 mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
52 cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
53 PORT="11211"
54 USER="nobody"
55 MAXCONN="1024"
56 CACHESIZE="64"
57 OPTIONS=""
58 EOF
59
60 # pid directory
61 mkdir -p %{buildroot}/%{_localstatedir}/run/memcached
62
63 %clean
64 rm -rf %{buildroot}
65
66
67 %post
68 /sbin/chkconfig --add %{name}
69
70 %preun
71 if [ "$1" = 0 ] ; then
72 /sbin/service %{name} stop > /dev/null 2>&1
73 /sbin/chkconfig --del %{name}
74 fi
75 exit 0
76
77 %postun
78 if [ "$1" -ge 1 ]; then
79 /sbin/service %{name} condrestart > /dev/null 2>&1
80 fi
81 exit 0
82
83
84 %files
85 %defattr(-,root,root,-)
86 %doc AUTHORS ChangeLog COPYING NEWS README doc/CONTRIBUTORS doc/*.txt
87 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
88
89 %dir %attr(750,nobody,nobody) %{_localstatedir}/run/memcached
90 %{_bindir}/memcached-tool
91 %{_bindir}/memcached
92 %{_mandir}/man1/memcached.1*
93 %{_initrddir}/memcached
94 %{_includedir}/memcached
95
96 %changelog
97 * Mon Nov 2 2009 Dormando <dormando@rydia.net> - 1.4.3-1
98 - Fix autogen more.
99
100 * Sat Aug 29 2009 Dustin Sallings <dustin@spy.net> - 1.4.1-1
101 - Autogenerate the version number from tags.
102
103 * Wed Jul 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
104 - Use /var/run/memcached/ directory to hold PID file
105
106 * Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
107 - Remove tabs from spec file, rpmlint reports no more errors
108
109 * Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
110 - Enable build-time regression tests
111 - add dependency on initscripts
112 - remove memcached-debug (not needed in dist)
113 - above suggestions from Bernard Johnson
114
115 * Mon May 7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
116 - Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
117
118 * Fri May 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
119 - Initial spec file created via rpmdev-newspec