xref: /memcached-1.4.29/memcached.spec.in (revision e875bea0)
14f567935SDustin SallingsName:           memcached
24f567935SDustin SallingsVersion:        @VERSION@
32906fae0SdormandoRelease:        @RELEASE@%{?dist}
44f567935SDustin SallingsSummary:        High Performance, Distributed Memory Object Cache
54f567935SDustin Sallings
64f567935SDustin SallingsGroup:          System Environment/Daemons
74f567935SDustin SallingsLicense:        BSD
8*e875bea0SdormandoURL:            http://memcached.org
9*e875bea0SdormandoSource0:        http://memcached.org/files/%{name}-@[email protected]
104f567935SDustin SallingsBuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
114f567935SDustin Sallings
124f567935SDustin SallingsBuildRequires:  libevent-devel
134f567935SDustin SallingsBuildRequires:  perl(Test::More)
14f81f69dbSJonathan SteinertBuildRequires:  /usr/bin/prove
154f567935SDustin SallingsRequires: initscripts
164f567935SDustin SallingsRequires(post): /sbin/chkconfig
174f567935SDustin SallingsRequires(preun): /sbin/chkconfig, /sbin/service
184f567935SDustin SallingsRequires(postun): /sbin/service
194f567935SDustin Sallings
204f567935SDustin Sallings%description
214f567935SDustin Sallingsmemcached is a high-performance, distributed memory object caching
224f567935SDustin Sallingssystem, generic in nature, but intended for use in speeding up dynamic
234f567935SDustin Sallingsweb applications by alleviating database load.
244f567935SDustin Sallings
254f567935SDustin Sallings%prep
262906fae0Sdormando%setup -q -n %{name}-@FULLVERSION@
274f567935SDustin Sallings
284f567935SDustin Sallings
294f567935SDustin Sallings%build
302906fae0Sdormando%configure
314f567935SDustin Sallings
324f567935SDustin Sallingsmake %{?_smp_mflags}
334f567935SDustin Sallings
344f567935SDustin Sallings%check
354f567935SDustin Sallingsmake test
364f567935SDustin Sallings
374f567935SDustin Sallings%install
384f567935SDustin Sallingsrm -rf %{buildroot}
394f567935SDustin Sallingsmake install DESTDIR=%{buildroot}
404f567935SDustin Sallings
414f567935SDustin Sallings# remove memcached-debug
424f567935SDustin Sallingsrm -f %{buildroot}/%{_bindir}/memcached-debug
434f567935SDustin Sallings
444f567935SDustin Sallings# Perl script for monitoring memcached
454f567935SDustin Sallingsinstall -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
464f567935SDustin Sallings
474f567935SDustin Sallings# Init script
484f567935SDustin Sallingsinstall -Dp -m0755 scripts/memcached.sysv %{buildroot}%{_initrddir}/memcached
494f567935SDustin Sallings
504f567935SDustin Sallings# Default configs
514f567935SDustin Sallingsmkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
524f567935SDustin Sallingscat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
534f567935SDustin SallingsPORT="11211"
544f567935SDustin SallingsUSER="nobody"
554f567935SDustin SallingsMAXCONN="1024"
564f567935SDustin SallingsCACHESIZE="64"
574f567935SDustin SallingsOPTIONS=""
584f567935SDustin SallingsEOF
594f567935SDustin Sallings
604f567935SDustin Sallings# pid directory
614f567935SDustin Sallingsmkdir -p %{buildroot}/%{_localstatedir}/run/memcached
624f567935SDustin Sallings
634f567935SDustin Sallings%clean
644f567935SDustin Sallingsrm -rf %{buildroot}
654f567935SDustin Sallings
664f567935SDustin Sallings
674f567935SDustin Sallings%post
684f567935SDustin Sallings/sbin/chkconfig --add %{name}
694f567935SDustin Sallings
704f567935SDustin Sallings%preun
714f567935SDustin Sallingsif [ "$1" = 0 ] ; then
724f567935SDustin Sallings    /sbin/service %{name} stop > /dev/null 2>&1
734f567935SDustin Sallings    /sbin/chkconfig --del %{name}
744f567935SDustin Sallingsfi
754f567935SDustin Sallingsexit 0
764f567935SDustin Sallings
774f567935SDustin Sallings%postun
784f567935SDustin Sallingsif [ "$1" -ge 1 ]; then
794f567935SDustin Sallings    /sbin/service %{name} condrestart > /dev/null 2>&1
804f567935SDustin Sallingsfi
814f567935SDustin Sallingsexit 0
824f567935SDustin Sallings
834f567935SDustin Sallings
844f567935SDustin Sallings%files
854f567935SDustin Sallings%defattr(-,root,root,-)
8641b55764Sdormando%doc AUTHORS ChangeLog COPYING NEWS README.md doc/CONTRIBUTORS doc/*.txt
874f567935SDustin Sallings%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
884f567935SDustin Sallings
894f567935SDustin Sallings%dir %attr(750,nobody,nobody) %{_localstatedir}/run/memcached
904f567935SDustin Sallings%{_bindir}/memcached-tool
914f567935SDustin Sallings%{_bindir}/memcached
924f567935SDustin Sallings%{_mandir}/man1/memcached.1*
934f567935SDustin Sallings%{_initrddir}/memcached
940bc6f264SJames Cohen%{_includedir}/memcached
954f567935SDustin Sallings
964f567935SDustin Sallings%changelog
972906fae0Sdormando* Mon Nov  2 2009 Dormando <[email protected]> - 1.4.3-1
982906fae0Sdormando- Fix autogen more.
992906fae0Sdormando
1004f567935SDustin Sallings* Sat Aug 29 2009 Dustin Sallings <[email protected]> - 1.4.1-1
1014f567935SDustin Sallings- Autogenerate the version number from tags.
1024f567935SDustin Sallings
1034f567935SDustin Sallings* Wed Jul  4 2007 Paul Lindner <[email protected]> - 1.2.2-5
1044f567935SDustin Sallings- Use /var/run/memcached/ directory to hold PID file
1054f567935SDustin Sallings
1064f567935SDustin Sallings* Sat May 12 2007 Paul Lindner <[email protected]> - 1.2.2-4
1074f567935SDustin Sallings- Remove tabs from spec file, rpmlint reports no more errors
1084f567935SDustin Sallings
1094f567935SDustin Sallings* Thu May 10 2007 Paul Lindner <[email protected]> - 1.2.2-3
1104f567935SDustin Sallings- Enable build-time regression tests
1114f567935SDustin Sallings- add dependency on initscripts
1124f567935SDustin Sallings- remove memcached-debug (not needed in dist)
1134f567935SDustin Sallings- above suggestions from Bernard Johnson
1144f567935SDustin Sallings
1154f567935SDustin Sallings* Mon May  7 2007 Paul Lindner <[email protected]> - 1.2.2-2
1164f567935SDustin Sallings- Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
1174f567935SDustin Sallings
1184f567935SDustin Sallings* Fri May  4 2007 Paul Lindner <[email protected]> - 1.2.2-1
1194f567935SDustin Sallings- Initial spec file created via rpmdev-newspec
120