root/branches/binary/server/memcached.spec @ 745

Revision 745, 2.8 kB (checked in by dsallings, 21 months ago)

Merged commit 'trunk' into lbinary as of r744

Line 
1Name:           memcached
2Version:        1.2.5
3Release:        1%{?dist}
4Summary:        High Performance, Distributed Memory Object Cache
5
6Group:          System Environment/Daemons
7License:        BSD
8URL:            http://www.danga.com/memcached/
9Source0:        http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz
10BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12BuildRequires:  libevent-devel
13BuildRequires:  perl(Test::More)
14Requires: initscripts
15Requires(post): /sbin/chkconfig
16Requires(preun): /sbin/chkconfig, /sbin/service
17Requires(postun): /sbin/service
18
19%description
20memcached is a high-performance, distributed memory object caching
21system, generic in nature, but intended for use in speeding up dynamic
22web applications by alleviating database load.
23
24%prep
25%setup -q
26
27
28%build
29%configure --enable-threads
30
31make %{?_smp_mflags}
32
33%check
34make test
35
36%install
37rm -rf %{buildroot}
38make install DESTDIR=%{buildroot}
39
40# remove memcached-debug
41rm -f %{buildroot}/%{_bindir}/memcached-debug
42
43# Perl script for monitoring memcached
44install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
45
46# Init script
47install -Dp -m0755 scripts/memcached.sysv %{buildroot}%{_initrddir}/memcached
48
49# Default configs
50mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
51cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
52PORT="11211"
53USER="nobody"
54MAXCONN="1024"
55CACHESIZE="64"
56OPTIONS=""
57EOF
58
59# pid directory
60mkdir -p %{buildroot}/%{_localstatedir}/run/memcached
61
62%clean
63rm -rf %{buildroot}
64
65
66%post
67/sbin/chkconfig --add %{name}
68
69%preun
70if [ "$1" = 0 ] ; then
71    /sbin/service %{name} stop > /dev/null 2>&1
72    /sbin/chkconfig --del %{name}
73fi
74exit 0
75
76%postun
77if [ "$1" -ge 1 ]; then
78    /sbin/service %{name} condrestart > /dev/null 2>&1
79fi
80exit 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
Note: See TracBrowser for help on using the browser.