2014-02-10 16:59:40 +01:00
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
2012-08-04 13:38:21 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2014-02-10 16:59:40 +01:00
|
|
|
# $Header: $
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-09-06 17:11:54 +02:00
|
|
|
EAPI="5"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2014-08-07 19:38:28 +02:00
|
|
|
inherit eutils systemd user versionator
|
|
|
|
|
2014-08-23 12:21:49 +02:00
|
|
|
MY_PV="$(get_version_component_range 1-3)-Beta-2"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
|
|
|
DESCRIPTION="TeamSpeak Server - Voice Communication Software"
|
2013-05-22 16:16:22 +02:00
|
|
|
HOMEPAGE="http://www.teamspeak.com/"
|
2014-08-07 19:38:28 +02:00
|
|
|
#SRC_URI="amd64? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/teamspeak3-server_linux-amd64-${PV}.tar.gz )
|
|
|
|
# x86? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/teamspeak3-server_linux-x86-${PV}.tar.gz )"
|
|
|
|
SRC_URI="amd64? ( http://ftp.4players.de/pub/hosted/ts3/releases/pre_releases/${MY_PV}/teamspeak3-server_linux-amd64-$(get_version_component_range 1-3).tar.gz )
|
|
|
|
x86? ( http://ftp.4players.de/pub/hosted/ts3/releases/pre_releases/${MY_PV}/teamspeak3-server_linux-x86-$(get_version_component_range 1-3).tar.gz )"
|
2014-01-18 07:06:18 +01:00
|
|
|
|
2014-03-19 04:59:10 +01:00
|
|
|
RESTRICT="fetch mirror strip"
|
2013-09-06 17:11:54 +02:00
|
|
|
|
2014-01-18 07:06:18 +01:00
|
|
|
LICENSE="teamspeak3 GPL-2"
|
2012-08-04 13:38:21 +02:00
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
2014-01-18 07:06:18 +01:00
|
|
|
IUSE="doc pdf mysql tsdns"
|
2013-09-06 17:11:54 +02:00
|
|
|
|
2014-08-07 19:38:28 +02:00
|
|
|
DEPEND="mysql? ( >=virtual/mysql-5.5 )"
|
2014-01-18 07:06:18 +01:00
|
|
|
RDEPEND="${DEPEND}"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
|
|
|
S="${WORKDIR}/teamspeak3-server_linux-${ARCH}"
|
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
pkg_nofetch() {
|
|
|
|
if use amd64 ; then
|
2014-08-07 19:38:28 +02:00
|
|
|
# einfo "Please download teamspeak3-server_linux-amd64-${PV}.tar.gz"
|
|
|
|
einfo "Please download teamspeak3-server_linux-amd64-$(get_version_component_range 1-3).tar.gz"
|
2013-05-11 04:53:38 +02:00
|
|
|
elif use x86 ; then
|
2014-08-07 19:38:28 +02:00
|
|
|
# einfo "Please download teamspeak3-server_linux-x86-${PV}.tar.gz"
|
|
|
|
einfo "Please download teamspeak3-server_linux-x86-$(get_version_component_range 1-3).tar.gz"
|
2013-05-11 04:53:38 +02:00
|
|
|
fi
|
|
|
|
einfo "from ${HOMEPAGE}?page=downloads and place this"
|
|
|
|
einfo "file in ${DISTDIR}"
|
|
|
|
}
|
|
|
|
|
2012-08-04 13:38:21 +02:00
|
|
|
pkg_setup() {
|
|
|
|
enewuser teamspeak3
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2013-05-11 04:53:38 +02:00
|
|
|
# Install TeamSpeak 3 server into /opt/teamspeak3-server.
|
2013-09-06 17:11:54 +02:00
|
|
|
local opt_dir="/opt/teamspeak3-server"
|
|
|
|
into ${opt_dir}
|
|
|
|
insinto ${opt_dir}
|
|
|
|
|
|
|
|
# Install binary, wrapper, shell files and libraries.
|
|
|
|
newsbin ts3server_linux_${ARCH} ts3server-bin
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
exeinto /usr/sbin
|
2013-09-06 17:11:54 +02:00
|
|
|
doexe "${FILESDIR}"/ts3server
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-09-06 17:11:54 +02:00
|
|
|
exeinto ${opt_dir}
|
|
|
|
doexe *.sh
|
|
|
|
doins *.so
|
2014-08-07 19:38:28 +02:00
|
|
|
# 'libmariadb.so.2' is hard-coded into the ts3-server binary :(
|
|
|
|
use mysql && doexe redist/libmariadb.so.2
|
2013-09-06 17:11:54 +02:00
|
|
|
doins -r sql
|
|
|
|
|
|
|
|
# Install documentation and tsdns.
|
|
|
|
dodoc -r CHANGELOG doc/*.txt
|
|
|
|
use doc && dodoc -r serverquerydocs
|
|
|
|
use pdf && dodoc doc/*.pdf
|
|
|
|
|
|
|
|
if use tsdns; then
|
|
|
|
newsbin tsdns/tsdnsserver_linux_${ARCH} tsdnsserver
|
|
|
|
|
|
|
|
newdoc tsdns/README README.tsdns
|
|
|
|
newdoc tsdns/USAGE USAGE.tsdns
|
|
|
|
dodoc tsdns/tsdns_settings.ini.sample
|
2013-09-16 18:04:53 +02:00
|
|
|
insinto /etc/teamspeak3-server
|
|
|
|
newins tsdns/tsdns_settings.ini.sample tsdns_settings.ini
|
2013-05-11 05:23:00 +02:00
|
|
|
fi
|
2013-09-06 17:11:54 +02:00
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
# Install the runtime FS layout.
|
2012-08-04 13:38:21 +02:00
|
|
|
insinto /etc/teamspeak3-server
|
2013-09-06 17:11:54 +02:00
|
|
|
doins "${FILESDIR}"/server.conf
|
2014-08-07 19:38:28 +02:00
|
|
|
use mysql && doins "${FILESDIR}"/ts3db_mariadb.ini
|
2013-05-22 18:00:41 +02:00
|
|
|
keepdir /{etc,var/{lib,log,run}}/teamspeak3-server
|
2013-05-11 04:53:38 +02:00
|
|
|
|
|
|
|
# Install the init script and systemd unit.
|
2013-09-06 17:11:54 +02:00
|
|
|
newinitd "${FILESDIR}"/${PN}.rc teamspeak3-server
|
2013-09-06 17:36:54 +02:00
|
|
|
use tsdns && newinitd "${FILESDIR}/teamspeak-tsdns-server.rc" teamspeak3-tsdns-server
|
2013-09-06 17:11:54 +02:00
|
|
|
systemd_dounit "${FILESDIR}"/systemd/teamspeak3.service
|
2014-03-18 10:14:18 +01:00
|
|
|
use tsdns && systemd_dounit "${FILESDIR}"/systemd/teamspeak3-tsdns-server.service
|
2013-09-06 17:11:54 +02:00
|
|
|
systemd_dotmpfilesd "${FILESDIR}"/systemd/teamspeak3.conf
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
# Fix up permissions.
|
2012-08-04 13:38:21 +02:00
|
|
|
fowners teamspeak3 /{etc,var/{lib,log,run}}/teamspeak3-server
|
2013-09-06 17:11:54 +02:00
|
|
|
fowners teamspeak3 ${opt_dir}
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-09-06 17:11:54 +02:00
|
|
|
fperms 700 /{etc,var/{lib,log,run}}/teamspeak3-server
|
|
|
|
fperms 755 ${opt_dir}
|
2012-08-04 13:38:21 +02:00
|
|
|
}
|