# $Id: smeserver-teamspeak-server.spec,v 1.2 2018/01/19 04:28:08 jpp Exp $ # Authority: cool34000 # Name: Sylvain Gomez %define name smeserver-teamspeak-server %define version 3.1 %define release 2 %define rpmver 4.0.4 Summary: Teamspeak is a VOIP server for on-line gaming Name: %{name} Version: %{version} Release: %{release}%{?dist} License: Freeware Group: VOIP Source: %{name}-%{version}.tar.gz Patch0: smeserver-teamspeak-server-3.1-patch0.patch Patch1: smeserver-teamspeak-server-3.1-patch1.patch URL: http://www.goteamspeak.com/ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch BuildRequires: e-smith-devtools Requires: e-smith-base, e-smith-release >= 9 %description This RPM is an unofficial addon for the SME Server 7.x. TeamSpeak is a software for quality voice communication via the Internet. After installation open your webbrowser at http://your_e-smith-server_name:14534 %changelog * Mon Mar 05 2018 John Crisp 3.1-2.sme - New init script - change default port * Thu Jan 18 2018 Jean-Philipe Pialasse 3.1-1.sme - fix [SME: 10494] - update to download TS3 with event * Fri Mar 8 2013 JP Pialasse 3.1-0 - added back the web interface - added back templates - added default db values in tar - improving installing script and events patch0 * Fri Mar 8 2013 JP Pialasse 3.0-0 - change tarball to remove teamspeak binaries - some .spec cleanup, some more scripts have to be moved out there * Mon May 12 2008 Sylvain Gomez [2.0.24.1-2] Website added - New php website added (tsweb) * Sun Nov 11 2007 Sylvain Gomez [2.0.24.1-1] New version - Based on latest version + updated server_linux - RPM structure fix - Uninstall sections fixed * Sun Jun 17 2007 Sylvain Gomez [2.0.20.1-2] Fixing bugs - Added teamspeak UserPassword - Removed useless lines - Few fix to teamspeak service file - Now deleting temporary files * Wed Jun 6 2007 Sylvain Gomez [2.0.20.1-1] Original version %prep %setup %patch0 -p1 %patch1 -p1 %build perl createlinks %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist %clean rm -rf $RPM_BUILD_ROOT %pre /sbin/e-smith/create-system-user teamspeak 1050 \ 'teamspeak' /opt/teamspeak /bin/bash %post %preun if [ $1 = 0 ] ; then DIR=/opt/teamspeak # Stopping TS service if needed... if [ -e $DIR/tsserver2.pid ]; then echo -n "Stopping the TeamSpeak Voice server..." if ( kill -TERM `cat $DIR/tsserver2.pid` ); then for c in $(seq 1 300); do if [ -e $DIR/tsserver2.pid ]; then echo -n "." sleep 1 fi done fi if [ -e $DIR/tsserver2.pid ]; then echo "server does not shutdown cleanly - killing" kill -KILL `cat $DIR/tsserver2.pid` rm $DIR/tsserver2.pid sleep 5 else echo "done" fi fi fi %postun if [ $1 = 0 ] ; then # echo "Unregistering and deleting service..." # rm -f /etc/rc.d/rc7.d/S98teamspeak # rm -f /etc/rc.d/rc6.d/K98teamspeak # /sbin/e-smith/config delete teamspeak # /sbin/e-smith/config delete tsweb # /sbin/e-smith/signal-event remoteaccess-update echo "Restarting Apache..." /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /etc/rc7.d/S86httpd-e-smith sigusr1 echo "Deleting user teamspeak..." userdel teamspeak echo "Deleting install directories..." rm -rf /opt/teamspeak rm -rf /opt/tsweb fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)