2013-05-11 04:53:38 +02:00
|
|
|
# Copyright 1999-2013 Gentoo Foundation
|
2012-08-04 13:38:21 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2013-05-22 16:16:22 +02:00
|
|
|
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.0.7.2.ebuild,v 1.1 2013/05/22 11:22:59 tomwij Exp $
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
EAPI=5
|
2012-08-04 13:38:21 +02:00
|
|
|
|
|
|
|
inherit eutils systemd user
|
|
|
|
|
|
|
|
DESCRIPTION="TeamSpeak Server - Voice Communication Software"
|
2013-05-22 16:16:22 +02:00
|
|
|
HOMEPAGE="http://www.teamspeak.com/"
|
2013-05-11 04:53:38 +02:00
|
|
|
LICENSE="teamspeak3 GPL-2"
|
2012-08-04 13:38:21 +02:00
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
2013-05-22 16:16:22 +02:00
|
|
|
RESTRICT="fetch mirror strip"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 04:53:38 +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 )"
|
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
|
|
|
|
einfo "Please download teamspeak3-server_linux-amd64-${PV}.tar.gz"
|
|
|
|
elif use x86 ; then
|
|
|
|
einfo "Please download teamspeak3-server_linux-x86-${PV}.tar.gz"
|
|
|
|
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.
|
2012-08-04 13:38:21 +02:00
|
|
|
local dest="${D}/opt/teamspeak3-server"
|
2013-05-11 04:53:38 +02:00
|
|
|
mkdir -p "${dest}" || die "Can't create ${dest} directory."
|
|
|
|
cp -R "${WORKDIR}/teamspeak3-server_linux-"*/* "${dest}/" || die "Can't copy files to ${dest}."
|
|
|
|
mv "${dest}/ts3server_linux_"* "${dest}/ts3server-bin" || die "Can't rename server file to t3server-bin."
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 04:53:38 +02:00
|
|
|
# Install wrapper.
|
|
|
|
exeinto /usr/sbin
|
|
|
|
doexe "${FILESDIR}/ts3server"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 05:23:00 +02:00
|
|
|
# Symlink tsdns somewhere useful
|
|
|
|
if use amd64 ; then
|
2013-05-11 05:27:16 +02:00
|
|
|
dosym "${D}"/opt/teamspeak3-server/tsdns/tsdnsserver_linux_amd64 /opt/teamspeak3-server/tsdns/tsdnsserver_linux
|
2013-05-11 05:23:00 +02:00
|
|
|
elif use x86 ; then
|
2013-05-11 05:27:16 +02:00
|
|
|
dosym "${D}"/opt/teamspeak3-server/tsdns/tsdnsserver_linux_x86 /opt/teamspeak3-server/tsdns/tsdnsserver_linux
|
2013-05-11 05:23:00 +02:00
|
|
|
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
|
|
|
|
doins "${FILESDIR}/server.conf"
|
|
|
|
newins "${dest}/tsdns/tsdns_settings.ini.sample" tsdns_settings.ini
|
|
|
|
dosym "${D}"/etc/teamspeak3-server/tsdns_settings.ini /opt/teamspeak3-server/tsdns/tsdns_settings.ini
|
2013-05-11 04:53:38 +02:00
|
|
|
|
|
|
|
# Install the init script and systemd unit.
|
2013-05-22 16:16:22 +02:00
|
|
|
newinitd "${FILESDIR}/${P}.rc" teamspeak3-server
|
2012-08-04 13:38:21 +02:00
|
|
|
newinitd "${FILESDIR}/teamspeak3-tsdns-server.rc" teamspeak3-tsdns-server
|
2013-05-11 04:53:38 +02:00
|
|
|
systemd_dounit "${FILESDIR}/systemd/teamspeak3.service"
|
|
|
|
systemd_dotmpfilesd "${FILESDIR}/systemd/teamspeak3.conf"
|
2012-08-04 13:38:21 +02:00
|
|
|
|
2013-05-11 04:56:49 +02:00
|
|
|
keepdir /{etc,var/{lib,log,run}}/teamspeak3-server
|
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
|
|
|
|
fperms 700 /{etc,var/{lib,log,run}}/teamspeak3-server
|
|
|
|
|
|
|
|
fowners teamspeak3 /opt/teamspeak3-server
|
|
|
|
fperms 755 /opt/teamspeak3-server
|
|
|
|
}
|