#!/bin/sh # Heavily based on Slackware 13.1 SlackBuild # http://www.goteamspeak.com # Packager==>Dimitris Tzemos # http://www.slackel.gr # # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # set -e # Set variables: CWD=`pwd` OUTPUT=${OUTPUT:-$CWD} PKGNAME=teamspeak-server TMP=${TMP:-/tmp/txz/$PKGNAME} PKG=$TMP/package VERSION=${VERSION:-3.0.0} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-dj} # Download sorce tarball if still not present #SOURCE="http://people.salixos.org/djemos/teamspeak3-server/teamspeak3-server_linux-x86-3.0.0.tar.gz" if [ ! -e $CWD/teamspeak3-server_linux-x86-3.0.0.tar.gz ]; then wget $SOURCE fi rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT # Decompress the source tarball cd $TMP tar xvf $CWD/teamspeak3-server_linux-x86-3.0.0.tar.gz cd teamspeak3-server_linux-x86 chown -R root:root . # Building TeamSpeak3 package mkdir -p $PKG/opt/TeamSpeak3-server cp -a * $PKG/opt/TeamSpeak3-server mkdir -p $PKG/usr/bin mkdir -p $PKG/usr/share/applications #cp teamspeak-server.desktop $PKG/usr/share/applications mkdir -p $PKG/etc/rc.d cp ts3server_startscript.sh $PKG/etc/rc.d/rc.teamspeak-server chmod 755 $PKG/etc/rc.d/rc.teamspeak-server echo -e "#!/bin/sh # # This startup script will set the correct library path # and then startup the teamspeak binary. # export LD_LIBRARY_PATH=/opt/TeamSpeak3-server #/opt/TeamSpeak3-server/ts3server_linux_x86" > $PKG/opt/TeamSpeak3-server/TeamSpeak-server #chmod 755 $PKG/opt/TeamSpeak3-server/TeamSpeak-server #Add documentation files: readme, changelog and so on mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild # Also add the slack-desk file and this slackbuild to the package mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/slack-desc cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/$PKGNAME.SlackBuild # Find and print dependencies into slack-required file cd $PKG chown -R root:root $PKG if [ -x /usr/bin/requiredbuilder ];then requiredbuilder -y -v -b -s $CWD $PKG fi # Create txz package /sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} # Cleanup if enabled if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi