X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=memcached.spec;h=34eba154f8c02d86dd149c3b4bfb8ad89bb16f42;hb=a3388ece71b16b5b0ebaf6c3e4b7674fc87e8125;hp=68fc6e852fff84cdb14ef17b81ac894b0e6542ad;hpb=e7316127eef3d9f806d24921f1e0379137382e0c;p=packages%2Fmemcached.git diff --git a/memcached.spec b/memcached.spec index 68fc6e8..34eba15 100644 --- a/memcached.spec +++ b/memcached.spec @@ -1,29 +1,33 @@ -# -# TODO: init script (see scripts/), -# but gotta test it first :-) -# +# TODO +# - memcached has -P option for pid, but root privs are dropped before +# pid is written, so either run memcached as new uid or hack code to +# write pidfile before changing uid, as rc-script removes pid on +# shutdown anyway. Summary: A high-performance, distributed memory object caching system -Summary(pl): Rozproszony system cache'owania obiektów o wysokiej wydajno¶ci +Summary(pl.UTF-8): Rozproszony, wysokiej wydajności system cache'owania obiektów Name: memcached -Version: 1.1.11 -Release: 0.1 -Epoch: 0 -License: GPL? -Vendor: Brad Fitzpatrick +Version: 1.2.5 +Release: 2 +License: BSD Group: Networking/Daemons Source0: http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz -# Source0-md5: f42301c02e4223a1f2298dd3d3c30d90 +# Source0-md5: 8ac0d1749ded88044f0f850fad979e4d +Source1: %{name}.init +Source2: %{name}.sysconfig URL: http://www.danga.com/memcached/ BuildRequires: autoconf BuildRequires: automake -BuildRequires: libevent-devel +BuildRequires: libevent-devel >= 1.1 +BuildRequires: rpmbuild(macros) >= 1.268 +Requires(post,preun): /sbin/chkconfig +Requires: rc-scripts BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description A high-performance, distributed memory object caching system. -%description -l pl -Rozproszony system cache'owania obiektów o wysokiej wydajno¶ci. +%description -l pl.UTF-8 +Rozproszony, wysokiej wydajności system cache'owania obiektów. %prep %setup -q @@ -38,15 +42,32 @@ Rozproszony system cache'owania obiekt %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} -install memcached $RPM_BUILD_ROOT%{_bindir} +install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} +install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1} + +install memcached $RPM_BUILD_ROOT%{_sbindir} install doc/memcached.1 $RPM_BUILD_ROOT%{_mandir}/man1 +install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} +install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} + +%post +/sbin/chkconfig --add %{name} +%service %{name} restart + +%preun +if [ "$1" = "0" ]; then + %service -q %{name} stop + /sbin/chkconfig --del %{name} +fi + %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc AUTHORS README TODO doc/*.txt -%attr(755,root,root) %{_bindir}/* +%attr(755,root,root) %{_sbindir}/* %{_mandir}/man1/* +%attr(754,root,root) /etc/rc.d/init.d/%{name} +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}