]> git.pld-linux.org Git - packages/memcached.git/commitdiff
- update to 1.2.6 auto/ac/memcached-1_2_6-1
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 24 Nov 2008 18:09:36 +0000 (18:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- add support for several daemons

Changed files:
    memcached.spec -> 1.28

memcached.spec

index 287091dc8f268b1c00a4f9dfe5ab052d9275208f..1e772b80e41efdadad9dd24bafba11324de2aa52 100644 (file)
@@ -1,17 +1,12 @@
-# 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.UTF-8):     Rozproszony, wysokiej wydajności system cache'owania obiektów
 Name:          memcached
-Version:       1.2.5
-Release:       4
+Version:       1.2.6
+Release:       1
 License:       BSD
 Group:         Networking/Daemons
 Source0:       http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz
-# Source0-md5: 8ac0d1749ded88044f0f850fad979e4d
+# Source0-md5: 200d22f7ac2d114f74a6904552e9eb70
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 URL:           http://www.danga.com/memcached/
@@ -20,7 +15,15 @@ BuildRequires:       automake
 BuildRequires: libevent-devel >= 1.1
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
 Requires:      rc-scripts
+Provides:      group(memcached)
+Provides:      user(memcached)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -42,7 +45,7 @@ Rozproszony, wysokiej wydajności system cache'owania obiektów.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/memcached}
 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1}
 
 install memcached $RPM_BUILD_ROOT%{_sbindir}
@@ -51,6 +54,10 @@ 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}
 
+%pre
+%groupadd -g 209 %{name}
+%useradd -u 209 -d /usr/share/empty -g %{name} -c "Memcached User" %{name}
+
 %post
 /sbin/chkconfig --add %{name}
 %service %{name} restart
@@ -61,13 +68,20 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       %userremove %{name}
+       %groupremove %{name}
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS README TODO doc/*.txt
-%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}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%attr(755,root,root) %{_sbindir}/%{name}
+%{_mandir}/man1/memcached.1*
+%dir %attr(770,root,memcached) /var/run/memcached
This page took 0.998561 seconds and 4 git commands to generate.