1 |
# $Id: smeserver-teamspeak-server.spec,v 1.2 2018/01/19 04:28:08 jpp Exp $ |
2 |
# Authority: cool34000 |
3 |
# Name: Sylvain Gomez |
4 |
|
5 |
%define name smeserver-teamspeak-server |
6 |
%define version 3.1 |
7 |
%define release 2 |
8 |
%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 |
Patch0: smeserver-teamspeak-server-3.1-patch0.patch |
19 |
Patch1: smeserver-teamspeak-server-3.1-patch1.patch |
20 |
URL: http://www.goteamspeak.com/ |
21 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
22 |
BuildArchitectures: noarch |
23 |
BuildRequires: e-smith-devtools |
24 |
Requires: e-smith-base, e-smith-release >= 9 |
25 |
|
26 |
|
27 |
%description |
28 |
This RPM is an unofficial addon for the SME Server 7.x. |
29 |
TeamSpeak is a software for quality voice communication via the Internet. |
30 |
After installation open your webbrowser at |
31 |
http://your_e-smith-server_name:14534 |
32 |
|
33 |
|
34 |
|
35 |
%changelog |
36 |
* Mon Mar 05 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 3.1-2.sme |
37 |
- New init script |
38 |
- change default port |
39 |
|
40 |
* Thu Jan 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 3.1-1.sme |
41 |
- fix [SME: 10494] |
42 |
- update to download TS3 with event |
43 |
|
44 |
* Fri Mar 8 2013 JP Pialasse <tests@pialasse.com> 3.1-0 |
45 |
- added back the web interface |
46 |
- added back templates |
47 |
- added default db values in tar |
48 |
- improving installing script and events patch0 |
49 |
|
50 |
* Fri Mar 8 2013 JP Pialasse <tests@pialasse.com> 3.0-0 |
51 |
- change tarball to remove teamspeak binaries |
52 |
- some .spec cleanup, some more scripts have to be moved out there |
53 |
|
54 |
* Mon May 12 2008 Sylvain Gomez <sylvaingomez@free.fr> |
55 |
[2.0.24.1-2] Website added |
56 |
- New php website added (tsweb) |
57 |
|
58 |
* Sun Nov 11 2007 Sylvain Gomez <sylvaingomez@free.fr> |
59 |
[2.0.24.1-1] New version |
60 |
- Based on latest version + updated server_linux |
61 |
- RPM structure fix |
62 |
- Uninstall sections fixed |
63 |
|
64 |
* Sun Jun 17 2007 Sylvain Gomez <sylvaingomez@free.fr> |
65 |
[2.0.20.1-2] Fixing bugs |
66 |
- Added teamspeak UserPassword |
67 |
- Removed useless lines |
68 |
- Few fix to teamspeak service file |
69 |
- Now deleting temporary files |
70 |
|
71 |
* Wed Jun 6 2007 Sylvain Gomez <sylvaingomez@free.fr> |
72 |
[2.0.20.1-1] Original version |
73 |
|
74 |
|
75 |
%prep |
76 |
|
77 |
|
78 |
%setup |
79 |
%patch0 -p1 |
80 |
%patch1 -p1 |
81 |
|
82 |
%build |
83 |
perl createlinks |
84 |
|
85 |
%install |
86 |
rm -rf $RPM_BUILD_ROOT |
87 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
88 |
rm -f %{name}-%{version}-filelist |
89 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
90 |
|
91 |
|
92 |
%clean |
93 |
rm -rf $RPM_BUILD_ROOT |
94 |
|
95 |
|
96 |
%pre |
97 |
/sbin/e-smith/create-system-user teamspeak 1050 \ |
98 |
'teamspeak' /opt/teamspeak /bin/bash |
99 |
|
100 |
%post |
101 |
|
102 |
|
103 |
%preun |
104 |
if [ $1 = 0 ] ; then |
105 |
DIR=/opt/teamspeak |
106 |
# Stopping TS service if needed... |
107 |
if [ -e $DIR/tsserver2.pid ]; then |
108 |
echo -n "Stopping the TeamSpeak Voice server..." |
109 |
if ( kill -TERM `cat $DIR/tsserver2.pid` ); then |
110 |
for c in $(seq 1 300); do |
111 |
if [ -e $DIR/tsserver2.pid ]; then |
112 |
echo -n "." |
113 |
sleep 1 |
114 |
fi |
115 |
done |
116 |
fi |
117 |
if [ -e $DIR/tsserver2.pid ]; then |
118 |
echo "server does not shutdown cleanly - killing" |
119 |
kill -KILL `cat $DIR/tsserver2.pid` |
120 |
rm $DIR/tsserver2.pid |
121 |
sleep 5 |
122 |
else |
123 |
echo "done" |
124 |
fi |
125 |
fi |
126 |
fi |
127 |
|
128 |
|
129 |
%postun |
130 |
if [ $1 = 0 ] ; then |
131 |
# echo "Unregistering and deleting service..." |
132 |
# rm -f /etc/rc.d/rc7.d/S98teamspeak |
133 |
# rm -f /etc/rc.d/rc6.d/K98teamspeak |
134 |
# /sbin/e-smith/config delete teamspeak |
135 |
# /sbin/e-smith/config delete tsweb |
136 |
# /sbin/e-smith/signal-event remoteaccess-update |
137 |
|
138 |
echo "Restarting Apache..." |
139 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
140 |
/etc/rc7.d/S86httpd-e-smith sigusr1 |
141 |
|
142 |
echo "Deleting user teamspeak..." |
143 |
userdel teamspeak |
144 |
|
145 |
echo "Deleting install directories..." |
146 |
rm -rf /opt/teamspeak |
147 |
rm -rf /opt/tsweb |
148 |
fi |
149 |
|
150 |
|
151 |
%files -f %{name}-%{version}-filelist |
152 |
|
153 |
|
154 |
%defattr(-,root,root) |