SPECS: ts2.spec - use %service, fix chkconfig deps

glen glen at pld-linux.org
Thu Apr 20 19:51:42 CEST 2006


Author: glen                         Date: Thu Apr 20 17:51:42 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service, fix chkconfig deps

---- Files affected:
SPECS:
   ts2.spec (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SPECS/ts2.spec
diff -u SPECS/ts2.spec:1.10 SPECS/ts2.spec:1.11
--- SPECS/ts2.spec:1.10	Sun May  1 19:31:30 2005
+++ SPECS/ts2.spec	Thu Apr 20 19:51:36 2006
@@ -7,20 +7,21 @@
 Epoch:		1
 License:	redistributable for non-commercial use
 Group:		Networking/Daemons
-Source0:	ftp://ftp.freenet.de/pub/4players/teamspeak.org/releases/ts2_server_%{version}.tar.bz2
+Source0:	ftp://ftp.freenet.de/pub/4players/teamspeak.org/releases/%{name}_server_%{version}.tar.bz2
 # Source0-md5:	e1f0dace646affc80c1e0d83fa7f9161
 Source1:	%{name}.init
 URL:		http://www.goteamspeak.com/
-BuildRequires:	rpmbuild(macros) >= 1.202
+BuildRequires:	rpmbuild(macros) >= 1.268
+Requires(post,preun):	/sbin/chkconfig
+Requires(postun):	/usr/sbin/userdel
 Requires(pre):	/bin/id
 Requires(pre):	/usr/sbin/useradd
-Requires(postun):	/usr/sbin/userdel
+Requires:	rc-scripts
 Provides:	user(tss)
 ExclusiveArch:	%{ix86}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define	uid	139
-%define	_localstatedir	/var/lib/tss
+%define		_localstatedir	/var/lib/tss
 
 %description
 TeamSpeak was primarily designed to work for people who are behind a
@@ -65,27 +66,21 @@
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-%useradd -u %{uid} -d /var/lib/tss -s /bin/sh -g daemon -c "TeamSpeak Server" tss
+%useradd -u 139 -d /var/lib/tss -s /bin/sh -g daemon -c "TeamSpeak Server" tss
 
 %post
 /sbin/chkconfig --add tss
-if [ -f /var/lock/subsys/tss ]; then
-	/etc/rc.d/init.d/tss restart >&2
-else
-	echo "Run \"/etc/rc.d/init.d/tss start\" to start TeamSpeak." >&2
-fi
+%service tss restart "TeamSpeak Server"
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/tss ]; then
-		/etc/rc.d/init.d/tss stop
-	fi
+	%service tss stop
 	/sbin/chkconfig --del tss
 fi
 
 %postun
 if [ "$1" = "0" ]; then
-    %userremove tss
+	%userremove tss
 fi
 
 %files
@@ -117,6 +112,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.11  2006/04/20 17:51:36  glen
+- use %service, fix chkconfig deps
+
 Revision 1.10  2005/05/01 17:31:30  glen
 - use %useradd/%groupadd macros
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/ts2.spec?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list