SPECS: memcached.spec - rel 1; add init scripts

arekm arekm at pld-linux.org
Fri Feb 3 23:53:26 CET 2006


Author: arekm                        Date: Fri Feb  3 22:53:26 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- rel 1; add init scripts

---- Files affected:
SPECS:
   memcached.spec (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SPECS/memcached.spec
diff -u SPECS/memcached.spec:1.7 SPECS/memcached.spec:1.8
--- SPECS/memcached.spec:1.7	Wed Jun 22 16:03:42 2005
+++ SPECS/memcached.spec	Fri Feb  3 23:53:21 2006
@@ -1,18 +1,18 @@
 # $Revision$, $Date$
-# TODO
-# - init script (see scripts/), but gotta test it first :-)
 #
 Summary:	A high-performance, distributed memory object caching system
 Summary(pl):	Rozproszony system cache'owania obiektów o wysokiej wydajności
 Name:		memcached
 Version:	1.1.12
-Release:	0.2
+Release:	1
 Epoch:		0
 License:	BSD
 Vendor:		Brad Fitzpatrick <brad at danga.com>
 Group:		Networking/Daemons
 Source0:	http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz
 # Source0-md5:	a1236dad33e9ac6c36d53faa8da61780
+Source1:	%{name}.init
+Source2:	%{name}.sysconfig
 URL:		http://www.danga.com/memcached/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -38,10 +38,25 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
+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
 
@@ -50,6 +65,8 @@
 %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}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -57,6 +74,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.8  2006/02/03 22:53:21  arekm
+- rel 1; add init scripts
+
 Revision 1.7  2005/06/22 14:03:42  glen
 - fix license (BSD)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/memcached.spec?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list