618683d
Name:           memcached
bcc3ec1
Version:        1.2.4
bcc3ec1
Release:        1%{?dist}
618683d
Summary:        High Performance, Distributed Memory Object Cache
618683d
618683d
Group:          System Environment/Daemons
618683d
License:        BSD
618683d
URL:            http://www.danga.com/memcached/
618683d
Source0:        http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz
618683d
618683d
# custom init script
618683d
Source1:        memcached.sysv
618683d
97b23d0
# Fixes
97b23d0
618683d
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
618683d
618683d
BuildRequires:  libevent-devel
618683d
BuildRequires:  perl(Test::More)
618683d
Requires: initscripts
618683d
Requires(post): /sbin/chkconfig
618683d
Requires(preun): /sbin/chkconfig, /sbin/service
618683d
Requires(postun): /sbin/service
618683d
618683d
%description
618683d
memcached is a high-performance, distributed memory object caching
618683d
system, generic in nature, but intended for use in speeding up dynamic
618683d
web applications by alleviating database load.
618683d
618683d
%prep
618683d
%setup -q
618683d
618683d
618683d
%build
618683d
%configure --enable-threads
618683d
618683d
make %{?_smp_mflags}
618683d
80d6042
618683d
%check
f858079
# remove failing test that doesn't work in
f858079
# build systems
f858079
rm -f t/daemonize.t 
618683d
make test
618683d
618683d
%install
618683d
rm -rf %{buildroot}
618683d
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"                                         
618683d
# remove memcached-debug
618683d
rm -f %{buildroot}/%{_bindir}/memcached-debug
618683d
618683d
# Perl script for monitoring memcached
618683d
install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
618683d
618683d
# Init script
618683d
install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/memcached
618683d
618683d
# Default configs
618683d
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
618683d
cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
618683d
PORT="11211"
618683d
USER="nobody"
618683d
MAXCONN="1024"
618683d
CACHESIZE="64"
618683d
OPTIONS=""
618683d
EOF
618683d
618683d
# pid directory
618683d
mkdir -p %{buildroot}/%{_localstatedir}/run/memcached
618683d
618683d
%clean
618683d
rm -rf %{buildroot}
618683d
618683d
618683d
%post
618683d
/sbin/chkconfig --add %{name}
618683d
618683d
%preun
618683d
if [ "$1" = 0 ] ; then
618683d
    /sbin/service %{name} stop > /dev/null 2>&1
618683d
    /sbin/chkconfig --del %{name}
618683d
fi
618683d
exit 0
618683d
618683d
%postun
618683d
if [ "$1" -ge 1 ]; then
618683d
    /sbin/service %{name} condrestart > /dev/null 2>&1
618683d
fi
618683d
exit 0
618683d
618683d
618683d
%files
618683d
%defattr(-,root,root,-)
618683d
%doc AUTHORS ChangeLog COPYING NEWS README TODO doc/CONTRIBUTORS doc/*.txt
618683d
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
618683d
618683d
%dir %attr(750,nobody,nobody) %{_localstatedir}/run/memcached
618683d
%{_bindir}/memcached-tool
618683d
%{_bindir}/memcached
618683d
%{_mandir}/man1/memcached.1*
618683d
%{_initrddir}/memcached
618683d
618683d
618683d
%changelog
fdeed36
* Mon Aug  6 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-7
888f13f
- Fix problem with -P and -d flag combo on x86_64
888f13f
- Fix init script for FC-6
888f13f
f858079
* Fri Jul 13 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-4
f858079
- Remove test that fails in fedora build system on ppc64
80d6042
80d6042
* Sat Jul  7 2007 root <lindner@inuus.com> - 1.2.3-2
618683d
- Upgrade to 1.2.3 upstream
618683d
- Adjust make install to preserve man page timestamp
618683d
- Conform with LSB init scripts standards, add force-reload
618683d
618683d
* Wed Jul  4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
618683d
- Use /var/run/memcached/ directory to hold PID file
618683d
618683d
* Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
618683d
- Remove tabs from spec file, rpmlint reports no more errors
618683d
618683d
* Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
618683d
- Enable build-time regression tests
618683d
- add dependency on initscripts
618683d
- remove memcached-debug (not needed in dist)
618683d
- above suggestions from Bernard Johnson
618683d
618683d
* Mon May  7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
618683d
- Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
618683d
618683d
* Fri May  4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
618683d
- Initial spec file created via rpmdev-newspec