sync with tree, also don't create useless dir, just set it correctly in initscript

Package-Manager: portage-2.2.01.21864-prefix
RepoMan-Options: --force
This commit is contained in:
Robert Förster 2013-05-11 04:53:38 +02:00
parent c78c641925
commit 6eef49a313
3 changed files with 77 additions and 66 deletions

View File

@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/files/teamspeak3-server.rc,v 1.5 2012/05/10 20:14:34 trapni Exp $
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc,v 1.1 2013/04/25 18:11:05 tomwij Exp $
depend() {
need net
@ -12,10 +12,11 @@ start() {
ebegin "Starting TeamSpeak 3 Server"
# ensure, that the TS3-server finds all custom supplied shared objects on startup.
export LD_LIBRARY_PATH="/opt/teamspeak3-server:$LD_LIBRARY_PATH"
LD_LIBRARY_PATH="/opt/teamspeak3-server:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
start-stop-daemon --start --quiet --background \
--pidfile "/var/run/teamspeak3-server/server.pid" --make-pidfile \
--pidfile "/var/run/teamspeak3/server.pid" --make-pidfile \
--user "teamspeak3" --chdir "/opt/teamspeak3-server" \
--exec "/usr/sbin/ts3server" -- \
inifile="/etc/teamspeak3-server/server.conf"
@ -27,7 +28,7 @@ stop() {
ebegin "Stopping TeamSpeak 3 Server"
start-stop-daemon --stop --quiet \
--pidfile "/var/run/teamspeak3-server/server.pid"
--pidfile "/var/run/teamspeak3/server.pid"
eend $?
}

View File

@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/files/teamspeak3-server.rc,v 1.4 2010/09/11 16:01:50 trapni Exp $
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc,v 1.1 2013/04/25 18:11:05 tomwij Exp $
depend() {
need net
@ -11,7 +11,7 @@ start() {
ebegin "Starting TeamSpeak 3 TSDNS Server"
start-stop-daemon --start --quiet --background \
--pidfile "/var/run/teamspeak3-server/tsdns.pid" --make-pidfile \
--pidfile "/var/run/teamspeak3/tsdns.pid" --make-pidfile \
--user "teamspeak3" --chdir "/opt/teamspeak3-server/tsdns" \
--exec "/opt/teamspeak3-server/tsdns/tsdnsserver"
@ -22,7 +22,7 @@ stop() {
ebegin "Stopping TeamSpeak 3 TSDNS Server"
start-stop-daemon --stop --quiet \
--pidfile "/var/run/teamspeak3-server/tsdns.pid"
--pidfile "/var/run/teamspeak3/tsdns.pid"
eend $?
}

View File

@ -1,60 +1,70 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.0.5-r2.ebuild,v 1.2 2012/06/09 23:22:53 zmedico Exp $
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.0.7.1.ebuild,v 1.1 2013/04/25 18:11:05 tomwij Exp $
EAPI=4
EAPI=5
inherit eutils systemd user
DESCRIPTION="TeamSpeak Server - Voice Communication Software"
HOMEPAGE="http://teamspeak.com/"
LICENSE="teamspeak3"
LICENSE="teamspeak3 GPL-2"
SLOT="0"
IUSE=""
KEYWORDS="~amd64 ~x86"
RESTRICT="strip"
RESTRICT="mirror fetch strip"
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/${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 )"
S="${WORKDIR}/teamspeak3-server_linux-${ARCH}"
DEPEND=""
RDEPEND="${DEPEND}"
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}"
}
pkg_setup() {
enewuser teamspeak3
}
src_install() {
# Install TeamSpeak 3 server into /opt/teamspeak3-server.
local dest="${D}/opt/teamspeak3-server"
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."
mkdir -p "${dest}"
cp -R "${WORKDIR}/teamspeak3-server_linux-"*/* "${dest}/" || die
# Install wrapper.
exeinto /usr/sbin
doexe "${FILESDIR}/ts3server"
mv "${dest}/ts3server_linux_"* "${dest}/ts3server-bin" || die
mv "${dest}/tsdns/tsdnsserver_linux_"* "${dest}/tsdns/tsdnsserver" || die
exeinto /usr/sbin || die
doexe "${FILESDIR}/ts3server" || die
# runtime FS layout ...
# Install the runtime FS layout.
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
newinitd "${FILESDIR}/teamspeak3-server.rc" teamspeak3-server
newinitd "${FILESDIR}/teamspeak3-tsdns-server.rc" teamspeak3-tsdns-server
keepdir /{etc,var/{lib,log,run}}/teamspeak3-server
# Install the init script and systemd unit.
newinitd "${FILESDIR}/teamspeak3-server.rc" teamspeak3-server
newinitd "${FILESDIR}/teamspeak3-tsdns-server.rc" teamspeak3-tsdns-server
systemd_dounit "${FILESDIR}/systemd/teamspeak3.service"
systemd_dotmpfilesd "${FILESDIR}/systemd/teamspeak3.conf"
# Fix up permissions.
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
systemd_dounit "${FILESDIR}/systemd/teamspeak3.service"
systemd_dotmpfilesd "${FILESDIR}/systemd/teamspeak3.conf"
}