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

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

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


Revision 1.2 - (hide annotations) (download)
Fri Mar 8 19:14:54 2013 UTC (11 years, 2 months ago) by unnilennium
Branch: MAIN
Changes since 1.1: +43 -39 lines
* Fri Mar 8 2013 JP Pialasse <tests@pialasse.com> 3.0-0
- change tarball to remove teamspeak binaries
- some .spec cleanup, some more scripts have to be moved out there

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

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