/[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.1 - (hide annotations) (download)
Tue Feb 26 01:05:35 2008 UTC (16 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-teamspeak-server-2_0_24_1-1_el4_sme
Remove version from spec

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

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