/[smecontribs]/rpms/smeserver-teamspeak-server/contribs7/smeserver-teamspeak-server.spec
ViewVC logotype

Annotation of /rpms/smeserver-teamspeak-server/contribs7/smeserver-teamspeak-server.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download)
Sun Nov 23 04:58:12 2008 UTC (15 years, 11 months ago) by slords
Branch: MAIN
Changes since 1.3: +1 -1 lines
FILE REMOVED
Part of epel

1 slords 1.4 # $Id: smeserver-teamspeak-server.spec,v 1.3 2008/05/14 13:49:54 slords Exp $
2 slords 1.2 # Authority: cool34000
3     # Name: Sylvain Gomez
4    
5 slords 1.1 %define name smeserver-teamspeak-server
6     %define version 2.0.24.1
7 slords 1.3 %define release 2
8 slords 1.1 %define rpmver 4.0.4
9    
10    
11     Summary: Teamspeak is a VOIP server for on-line gaming
12     Name: %{name}
13     Version: %{version}
14     Release: %{release}%{?dist}
15 slords 1.3 License: Freeware
16 slords 1.1 Group: VOIP
17     Source: %{name}-%{version}.tar.gz
18     URL: http://www.goteamspeak.com/
19     BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
20     BuildArchitectures: noarch
21     BuildRequires: e-smith-devtools
22     Requires: e-smith-base, e-smith-release >= 7
23    
24    
25     %description
26     This RPM is an unofficial addon for the SME Server 7.x.
27     TeamSpeak is a software for quality voice communication via the Internet.
28     After installation open your webbrowser at
29     http://your_e-smith-server_name:14534
30    
31    
32    
33     %changelog
34 slords 1.3 * Mon May 12 2008 Sylvain Gomez <sylvaingomez@free.fr>
35     [2.0.24.1-2] Website added
36     - New php website added (tsweb)
37    
38 slords 1.1 * Sun Nov 11 2007 Sylvain Gomez <sylvaingomez@free.fr>
39     [2.0.24.1-1] New version
40     - Based on latest version + updated server_linux
41     - RPM structure fix
42     - Uninstall sections fixed
43    
44     * Sun Jun 17 2007 Sylvain Gomez <sylvaingomez@free.fr>
45     [2.0.20.1-2] Fixing bugs
46     - Added teamspeak UserPassword
47     - Removed useless lines
48     - Few fix to teamspeak service file
49     - Now deleting temporary files
50    
51     * Wed Jun 6 2007 Sylvain Gomez <sylvaingomez@free.fr>
52     [2.0.20.1-1] Original version
53    
54    
55     %prep
56    
57    
58     %setup
59    
60    
61     %build
62     # Default DB parameters
63     DEFAULTS1=root/etc/e-smith/db/configuration/defaults/teamspeak
64     DEFAULTS2=root/etc/e-smith/db/accounts/defaults/teamspeak
65 slords 1.3 DEFAULTS3=root/etc/e-smith/db/configuration/defaults/tsweb
66     DEFAULTS4=root/etc/e-smith/db/accounts/defaults/tsweb
67 slords 1.1 mkdir -p $DEFAULTS1
68     mkdir -p $DEFAULTS2
69 slords 1.3 mkdir -p $DEFAULTS3
70     mkdir -p $DEFAULTS4
71 slords 1.1 echo "public" > $DEFAULTS1/access
72     echo "enabled" > $DEFAULTS1/status
73     echo "service" > $DEFAULTS1/type
74     echo "8767" > $DEFAULTS1/UDPPort
75     echo "reserved" > $DEFAULTS2/type
76 slords 1.3 echo "url" > $DEFAULTS3/type
77     echo "reserved" > $DEFAULTS4/type
78 slords 1.1
79    
80     %install
81     rm -rf $RPM_BUILD_ROOT
82     (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
83     rm -f %{name}-%{version}-filelist
84     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
85    
86    
87     %clean
88     rm -rf $RPM_BUILD_ROOT
89    
90    
91     %pre
92    
93    
94     %post
95     # Adding teamspeak to SME's db
96     /etc/e-smith/events/actions/initialize-default-databases
97     echo " "
98    
99     # Variables
100     SRVNAME=$(/sbin/e-smith/db configuration get SystemName)
101 slords 1.3 DOMAINNAME=$(/sbin/e-smith/db configuration get DomainName)
102 slords 1.1 TSPASS=$(/sbin/e-smith/db configuration getprop teamspeak UserPassword)
103    
104     echo "Decompressing files..."
105     tar -xjf /usr/share/doc/teamspeak-server-2.0.24.1/Sources/ts2_server_rc2_202319.tar.bz2 -C /opt
106     mv -f /opt/tss2_rc2 /opt/teamspeak
107     cp -f /usr/share/doc/teamspeak-server-2.0.24.1/Sources/server_linux /opt/teamspeak/
108     rm -f /opt/teamspeak/teamspeak2-server_startscript
109    
110     echo "Creating user teamspeak..."
111     useradd -M -c 'TeamSpeak Server' -d /opt/teamspeak teamspeak -s /bin/bash -p '$TSPASS'
112     chown -R root:teamspeak /opt/teamspeak
113     chmod 770 /opt/teamspeak
114     chmod 750 /opt/teamspeak/server_linux
115     chmod 750 /opt/teamspeak/sqlite_sql
116    
117     echo "Creating service..."
118     ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98teamspeak
119     ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc6.d/K98teamspeak
120     /sbin/e-smith/signal-event remoteaccess-update
121    
122 slords 1.3 echo "Restarting Apache..."
123     /sbin/e-smith/expand-template /opt/tsweb/config.php
124     /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
125     /etc/rc7.d/S86httpd-e-smith sigusr1
126    
127 slords 1.1 echo "Starting the daemon..."
128     /etc/rc7.d/S98teamspeak start
129    
130     echo " "
131     echo "-------------------------------------------------------------------------------"
132     echo "TeamSpeak Server installation finished."
133     echo "You can access to the configuration page at: http://$SRVNAME:14534"
134     /etc/rc7.d/S98teamspeak passwords
135     echo " "
136 slords 1.3 echo "The web page for teamspeak webusers: http://$DOMAINNAME/tsweb"
137     echo " "
138 slords 1.1 /sbin/e-smith/config show teamspeak
139     echo "-------------------------------------------------------------------------------"
140    
141 slords 1.3
142 slords 1.1 %preun
143     if [ $1 = 0 ] ; then
144     DIR=/opt/teamspeak
145     # Stopping TS service if needed...
146     if [ -e $DIR/tsserver2.pid ]; then
147     echo -n "Stopping the TeamSpeak Voice server..."
148     if ( kill -TERM `cat $DIR/tsserver2.pid` ); then
149     for c in $(seq 1 300); do
150     if [ -e $DIR/tsserver2.pid ]; then
151     echo -n "."
152     sleep 1
153     fi
154     done
155     fi
156     if [ -e $DIR/tsserver2.pid ]; then
157     echo "server does not shutdown cleanly - killing"
158     kill -KILL `cat $DIR/tsserver2.pid`
159     rm $DIR/tsserver2.pid
160     sleep 5
161     else
162     echo "done"
163     fi
164     fi
165     fi
166    
167    
168     %postun
169     if [ $1 = 0 ] ; then
170     echo "Unregistering and deleting service..."
171     rm -f /etc/rc.d/rc7.d/S98teamspeak
172     rm -f /etc/rc.d/rc6.d/K98teamspeak
173     /sbin/e-smith/config delete teamspeak
174 slords 1.3 /sbin/e-smith/config delete tsweb
175 slords 1.1 /sbin/e-smith/signal-event remoteaccess-update
176    
177 slords 1.3 echo "Restarting Apache..."
178     /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
179     /etc/rc7.d/S86httpd-e-smith sigusr1
180    
181 slords 1.1 echo "Deleting user teamspeak..."
182     userdel teamspeak
183    
184 slords 1.3 echo "Deleting install directories..."
185 slords 1.1 rm -rf /opt/teamspeak
186 slords 1.3 rm -rf /opt/tsweb
187 slords 1.1 fi
188    
189    
190     %files -f %{name}-%{version}-filelist
191    
192    
193     %defattr(-,root,root)

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed