2016-02-03 13:20:21 +01:00
|
|
|
# Copyright 1999-2016 Gentoo Foundation
|
2012-08-04 13:38:21 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2017-08-26 14:48:11 +02:00
|
|
|
EAPI="6"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2017-08-26 14:48:11 +02:00
|
|
|
inherit multilib systemd user versionator
|
2014-08-07 19:38:28 +02:00
|
|
|
|
2015-09-30 03:30:16 +02:00
|
|
|
MY_PV="$(get_version_component_range 1-4)-Beta-$(get_version_component_range 5)"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2017-08-26 14:48:11 +02:00
|
|
|
DESCRIPTION="Crystal Clear Cross-Platform Voice Communication Server"
|
|
|
|
HOMEPAGE="https://www.teamspeak.com/"
|
2015-09-30 03:30:16 +02:00
|
|
|
if [[ ${PV} != "*_beta*" ]] ; then
|
2015-03-22 09:17:39 +01:00
|
|
|
SRC_URI="
|
2017-08-26 14:48:11 +02:00
|
|
|
amd64? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/teamspeak3-server_linux_amd64-${PV}.tar.bz2 )
|
|
|
|
x86? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/teamspeak3-server_linux_x86-${PV}.tar.bz2 )"
|
2015-09-30 03:30:16 +02:00
|
|
|
else
|
|
|
|
SRC_URI="
|
2017-08-26 14:48:11 +02:00
|
|
|
amd64? ( http://ftp.4players.de/pub/hosted/ts3/releases/pre_releases/server/${MY_PV}/teamspeak3-server_linux_amd64-${MY_PV}.tar.bz2 )
|
|
|
|
x86? ( http://ftp.4players.de/pub/hosted/ts3/releases/pre_releases/server/${MY_PV}/teamspeak3-server_linux_x86-${MY_PV}.tar.bz2 )"
|
2014-10-06 15:22:13 +02:00
|
|
|
fi
|
2013-09-06 17:11:54 +02:00
|
|
|
|
2012-08-04 13:38:21 +02:00
|
|
|
SLOT="0"
|
2015-03-22 09:17:39 +01:00
|
|
|
LICENSE="teamspeak3 GPL-2"
|
2016-02-03 13:20:21 +01:00
|
|
|
IUSE="doc mysql tsdns"
|
2012-08-04 13:38:21 +02:00
|
|
|
KEYWORDS="~amd64 ~x86"
|
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
|
|
|
|
2016-02-03 13:20:21 +01:00
|
|
|
RESTRICT="installsources mirror strip"
|
2015-03-22 09:17:39 +01:00
|
|
|
|
2016-02-03 13:20:21 +01:00
|
|
|
S="${WORKDIR}/teamspeak3-server_linux_${ARCH}"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2017-08-26 14:48:11 +02:00
|
|
|
QA_PREBUILT="opt/*"
|
2015-08-21 14:55:40 +02:00
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
pkg_nofetch() {
|
2015-03-22 09:17:39 +01:00
|
|
|
elog "Please download ${A}"
|
2017-08-26 14:48:11 +02:00
|
|
|
elog "from ${HOMEPAGE}downloads and place this"
|
2015-03-22 09:17:39 +01:00
|
|
|
elog "file in ${DISTDIR}"
|
2013-05-11 04:53:38 +02:00
|
|
|
}
|
|
|
|
|
2012-08-04 13:38:21 +02:00
|
|
|
pkg_setup() {
|
|
|
|
enewuser teamspeak3
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2015-03-31 10:18:17 +02:00
|
|
|
# Install wrapper
|
2015-03-22 09:17:39 +01:00
|
|
|
dosbin "${FILESDIR}"/ts3server
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2015-03-31 10:12:25 +02:00
|
|
|
# Install TeamSpeak 3 server into /opt/teamspeak3-server.
|
|
|
|
local opt_dir="/opt/teamspeak3-server"
|
|
|
|
into ${opt_dir}
|
|
|
|
insinto ${opt_dir}
|
2013-09-06 17:11:54 +02:00
|
|
|
exeinto ${opt_dir}
|
2016-02-03 13:20:21 +01:00
|
|
|
newsbin ts3server ts3server-bin
|
2013-09-06 17:11:54 +02:00
|
|
|
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
|
|
|
|
|
2015-03-22 09:17:39 +01:00
|
|
|
# Install documentation and tsdns.
|
2013-09-06 17:11:54 +02:00
|
|
|
dodoc -r CHANGELOG doc/*.txt
|
2017-08-26 14:48:11 +02:00
|
|
|
use doc && dodoc -r serverquerydocs doc/serverquery && \
|
2015-08-21 14:55:40 +02:00
|
|
|
docompress -x /usr/share/doc/${PF}/serverquerydocs && \
|
2017-08-26 14:48:11 +02:00
|
|
|
docompress -x /usr/share/doc/${PF}/serverquery && \
|
|
|
|
dosym ../../../usr/share/doc/${PF}/serverquery ${opt_dir}/doc/serverquery && \
|
|
|
|
dosym ../../usr/share/doc/${PF}/serverquerydocs ${opt_dir}/serverquerydocs
|
2013-09-06 17:11:54 +02:00
|
|
|
|
2015-03-22 09:17:39 +01:00
|
|
|
if use tsdns; then
|
2016-02-03 13:20:21 +01:00
|
|
|
newsbin tsdns/tsdnsserver tsdnsserver
|
2015-03-22 09:17:39 +01:00
|
|
|
newdoc tsdns/README README.tsdns
|
|
|
|
newdoc tsdns/USAGE USAGE.tsdns
|
|
|
|
dodoc tsdns/tsdns_settings.ini.sample
|
|
|
|
fi
|
|
|
|
|
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
|
2015-08-21 14:55:40 +02:00
|
|
|
doins "${FILESDIR}"/server.conf "${FILESDIR}"/ts3db_mariadb.ini
|
|
|
|
keepdir /{etc,var/{lib,log}}/teamspeak3-server
|
2013-05-11 04:53:38 +02:00
|
|
|
|
|
|
|
# Install the init script and systemd unit.
|
2015-08-21 14:55:40 +02:00
|
|
|
newinitd "${FILESDIR}"/${PN}-init-r1 teamspeak3-server
|
2017-08-26 14:48:11 +02:00
|
|
|
systemd_newunit "${FILESDIR}"/systemd/teamspeak3-r1.service teamspeak3-server.service
|
|
|
|
systemd_newtmpfilesd "${FILESDIR}"/systemd/teamspeak3.conf teamspeak3-server.conf
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
# Fix up permissions.
|
2015-08-21 14:55:40 +02:00
|
|
|
fowners teamspeak3 /{etc,var/{lib,log}}/teamspeak3-server
|
2013-09-06 17:11:54 +02:00
|
|
|
fowners teamspeak3 ${opt_dir}
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2015-08-21 14:55:40 +02:00
|
|
|
fperms 700 /{etc,var/{lib,log}}/teamspeak3-server
|
2013-09-06 17:11:54 +02:00
|
|
|
fperms 755 ${opt_dir}
|
2012-08-04 13:38:21 +02:00
|
|
|
}
|
2017-08-26 14:48:11 +02:00
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
einfo "Starting with version 3.0.13, there are two important changes:"
|
|
|
|
einfo "- IPv6 is now supported."
|
|
|
|
einfo "- Binding to any address (0.0.0.0 / 0::0),"
|
|
|
|
einfo " instead of just the default ip of the network interface."
|
|
|
|
}
|