memcached/memcached.spec

103 lines
3.0 KiB
RPMSpec

#
# spec file for package memcached (Version 1.1.12)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: memcached
BuildRequires: libevent
%define home /var/lib/%{name}
Version: 1.1.12
Release: 28
License: BSD License and BSD-like
Group: Productivity/Networking/Other
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/sbin/useradd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
URL: http://www.danga.com/memcached/
Source0: http://www.danga.com/memcached/dist/memcached-%{version}.tar.gz
Source1: %{name}.init
Source2: %{name}.sysconfig
Summary: memcached is a high-performance, distributed memory object caching system
%description
memcached is a high-performance, distributed memory object caching
system, generic in nature, but intended for use in speeding up dynamic
web applications by alleviating database load.
Danga Interactive developed memcached to enhance the speed of
LiveJournal.com, a site which was already doing 20 million+ dynamic
page views per day for 1 million users with a bunch of webservers and a
bunch of database servers. memcached dropped the database load to
almost nothing, yielding faster page load times for users, better
resource utilization, and faster access to the databases on a memcache
miss.
Authors:
--------
Brad Fitzpatrick <brad@danga.com>
%prep
%setup
%build
%configure --bindir=%{_sbindir}
%{__make}
%install
%makeinstall
%{__install} -Dd -m 0755 \
%{buildroot}%{home} \
%{buildroot}%{_sysconfdir}/init.d \
%{buildroot}/var/adm/fillup-templates/
%{__install} -m 0755 %{S:1} \
%{buildroot}%{_sysconfdir}/init.d/%{name}
ln -sf ../..%{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%{__install} -m 0644 %{S:2} \
%{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
%clean
[ "%{buildroot}" != "/" ] && [ -d %{buildroot} ] && rm -rf %{buildroot};
%pre
#
# e.g. adding user
#
/usr/sbin/groupadd -r %{name} &>/dev/null || :
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "user for %{name}" -d %{home} %{name} &>/dev/null || :
%post
%fillup_and_insserv %{name}
%preun
%stop_on_removal %{name}
%postun
%restart_on_update %{name}
%{insserv_cleanup}
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO doc/*.txt
%{_sbindir}/%{name}
%{_sbindir}/rc%{name}
%{_mandir}/man1/%{name}.*
%{_sysconfdir}/init.d/%{name}
/var/adm/fillup-templates/sysconfig.%{name}
%dir %attr(750,root,root) %{home}
%changelog -n memcached
* Sun Nov 12 2006 - lmuelle@suse.de
- Fix typo in sysconfig file.
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Aug 18 2005 - mrueckert@suse.de
- Initial package with version 1.1.12