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

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

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

Revision 1.2 by unnilennium, Fri Mar 8 19:14:54 2013 UTC Revision 1.4 by unnilennium, Thu Jun 20 20:51:28 2013 UTC
# Line 1  Line 1 
1  # $Id: smeserver-teamspeak-server.spec,v 1.1 2013/03/03 23:30:41 unnilennium Exp $  # $Id: smeserver-teamspeak-server.spec,v 1.3 2013/03/08 22:00:38 unnilennium Exp $
2  # Authority: cool34000  # Authority: cool34000
3  # Name: Sylvain Gomez  # Name: Sylvain Gomez
4    
5  %define name smeserver-teamspeak-server  %define name smeserver-teamspeak-server
6  %define version 3.0  %define version 3.1
7  %define release 0  %define release 0
8  %define rpmver  4.0.4  %define rpmver  4.0.4
9    
# Line 15  Release:            %{release}%{?dist} Line 15  Release:            %{release}%{?dist}
15  License:            Freeware  License:            Freeware
16  Group:              VOIP  Group:              VOIP
17  Source:             %{name}-%{version}.tar.gz  Source:             %{name}-%{version}.tar.gz
18    Patch0:             smeserver-teamspeak-server-3.1-patch0.patch
19  URL:                http://www.goteamspeak.com/  URL:                http://www.goteamspeak.com/
20  BuildRoot:          /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot:          /var/tmp/%{name}-%{version}-%{release}-buildroot
21  BuildArchitectures: noarch  BuildArchitectures: noarch
# Line 31  http://your_e-smith-server_name:14534 Line 32  http://your_e-smith-server_name:14534
32    
33    
34  %changelog  %changelog
35    * Fri Mar 8 2013 JP Pialasse <tests@pialasse.com> 3.1-0
36    - added back the web interface
37    - added back templates
38    - added default db values in tar
39    - improving installing script and events patch0
40    
41  * Fri Mar 8 2013 JP Pialasse <tests@pialasse.com> 3.0-0  * Fri Mar 8 2013 JP Pialasse <tests@pialasse.com> 3.0-0
42  - change tarball to remove teamspeak binaries  - change tarball to remove teamspeak binaries
43  - some .spec cleanup, some more scripts have to be moved out there  - some .spec cleanup, some more scripts have to be moved out there
# Line 60  http://your_e-smith-server_name:14534 Line 67  http://your_e-smith-server_name:14534
67    
68    
69  %setup  %setup
70    %patch0 -p1
71    
72  %build  %build
73  # Default DB parameters  perl createlinks
 DEFAULTS1=root/etc/e-smith/db/configuration/defaults/teamspeak  
 DEFAULTS2=root/etc/e-smith/db/accounts/defaults/teamspeak  
 DEFAULTS3=root/etc/e-smith/db/configuration/defaults/tsweb  
 DEFAULTS4=root/etc/e-smith/db/accounts/defaults/tsweb  
 mkdir -p $DEFAULTS1  
 mkdir -p $DEFAULTS2  
 mkdir -p $DEFAULTS3  
 mkdir -p $DEFAULTS4  
 echo "public"   > $DEFAULTS1/access  
 echo "enabled"  > $DEFAULTS1/status  
 echo "service"  > $DEFAULTS1/type  
 echo "8767"     > $DEFAULTS1/UDPPort  
 echo "reserved" > $DEFAULTS2/type  
 echo "url"      > $DEFAULTS3/type  
 echo "reserved" > $DEFAULTS4/type  
   
74    
75  %install  %install
76  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 93  rm -rf $RPM_BUILD_ROOT Line 84  rm -rf $RPM_BUILD_ROOT
84    
85    
86  %pre  %pre
87    /sbin/e-smith/create-system-user teamspeak 1050 \
88        'teamspeak' /opt/teamspeak /bin/bash
89    
90  %post  %post
 # Adding teamspeak to SME's db  
 /etc/e-smith/events/actions/initialize-default-databases  
 echo " "  
   
 # Variables  
 SRVNAME=$(/sbin/e-smith/db configuration get SystemName)  
 DOMAINNAME=$(/sbin/e-smith/db configuration get DomainName)  
 TSPASS=$(/sbin/e-smith/db configuration getprop teamspeak UserPassword)  
   
 #echo "Decompressing files..."  
 #tar -xjf /usr/share/doc/teamspeak-server-2.0.24.1/Sources/ts2_server_rc2_202319.tar.bz2 -C /opt  
 #mv -f /opt/tss2_rc2 /opt/teamspeak  
 #cp -f /usr/share/doc/teamspeak-server-2.0.24.1/Sources/server_linux /opt/teamspeak/  
 #rm -f /opt/teamspeak/teamspeak2-server_startscript  
   
 #echo "Creating user teamspeak..."  
 #useradd -M -c 'TeamSpeak Server' -d /opt/teamspeak teamspeak -s /bin/bash -p '$TSPASS'  
 #chown -R root:teamspeak /opt/teamspeak  
 #chmod 770 /opt/teamspeak  
 #chmod 750 /opt/teamspeak/server_linux  
 #chmod 750 /opt/teamspeak/sqlite_sql  
   
 #echo "Creating service..."  
 #ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98teamspeak  
 #ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc6.d/K98teamspeak  
 #/sbin/e-smith/signal-event remoteaccess-update  
   
 #echo "Restarting Apache..."  
 #/sbin/e-smith/expand-template /opt/tsweb/config.php  
 #/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  
 #/etc/rc7.d/S86httpd-e-smith sigusr1  
   
 #echo "Starting the daemon..."  
 #/etc/rc7.d/S98teamspeak start  
   
 #echo " "  
 #echo "-------------------------------------------------------------------------------"  
 #echo "TeamSpeak Server installation finished."  
 #echo "You can access to the configuration page at: http://$SRVNAME:14534"  
 #/etc/rc7.d/S98teamspeak passwords  
 #echo " "  
 #echo "The web page for teamspeak webusers: http://$DOMAINNAME/tsweb"  
 #echo " "  
 #/sbin/e-smith/config show teamspeak  
 #echo "-------------------------------------------------------------------------------"  
91    
92    
93  %preun  %preun
# Line 171  fi Line 118  fi
118    
119  %postun  %postun
120  if [ $1 = 0 ] ; then  if [ $1 = 0 ] ; then
121    echo "Unregistering and deleting service..."  #  echo "Unregistering and deleting service..."
122    rm -f /etc/rc.d/rc7.d/S98teamspeak  #  rm -f /etc/rc.d/rc7.d/S98teamspeak
123    rm -f /etc/rc.d/rc6.d/K98teamspeak  #  rm -f /etc/rc.d/rc6.d/K98teamspeak
124    /sbin/e-smith/config delete teamspeak  #  /sbin/e-smith/config delete teamspeak
125    /sbin/e-smith/config delete tsweb  #  /sbin/e-smith/config delete tsweb
126    /sbin/e-smith/signal-event remoteaccess-update  #  /sbin/e-smith/signal-event remoteaccess-update
127    
128    echo "Restarting Apache..."    echo "Restarting Apache..."
129    /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf    /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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