From 962c3358888c8355aadc7992bfee7201e846d387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Fri, 21 Aug 2015 14:55:40 +0200 Subject: [PATCH] [media-sound/teamspeak-server-bin] sync with tree --- ...er-bin.rc => teamspeak-server-bin-init-r1} | 35 +++++++++---------- .../teamspeak-server-bin-3.0.11.3.ebuild | 24 +++++++------ 2 files changed, 29 insertions(+), 30 deletions(-) rename media-sound/teamspeak-server-bin/files/{teamspeak-server-bin.rc => teamspeak-server-bin-init-r1} (59%) diff --git a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin.rc b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r1 similarity index 59% rename from media-sound/teamspeak-server-bin/files/teamspeak-server-bin.rc rename to media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r1 index 161cebd..a3fe577 100644 --- a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin.rc +++ b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r1 @@ -1,16 +1,19 @@ #!/sbin/runscript -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ +# $Id$ + +name="TeamSpeak Server" +command="/usr/sbin/ts3server" +pidfile="/run/teamspeak3-server/server.pid" +command_background="true" depend() { need net use mysql } -start() { - ebegin "Starting TeamSpeak 3 Server" - +start_pre() { # ensure, that the TS3-server finds all custom supplied shared objects on startup. LD_LIBRARY_PATH="/opt/teamspeak3-server:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH @@ -18,11 +21,14 @@ start() { # temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there) rm -f /dev/shm/7gbhujb54g8z9hu43jre8 - [ -d /var/run/teamspeak3-server ] || mkdir /var/run/teamspeak3-server - chown teamspeak3:teamspeak3 /var/run/teamspeak3-server + checkpath -d --owner teamspeak3:teamspeak3 --mode 0700 /run/teamspeak3-server +} + +start() { + ebegin "Starting ${name}" start-stop-daemon --start --quiet --background \ - --pidfile "/var/run/teamspeak3-server/server.pid" --make-pidfile \ + --pidfile "/run/teamspeak3-server/server.pid" --make-pidfile \ --user "teamspeak3" --chdir "/opt/teamspeak3-server" \ --exec "/usr/sbin/ts3server" -- \ inifile="/etc/teamspeak3-server/server.conf" @@ -30,17 +36,8 @@ start() { eend $? } -stop() { - ebegin "Stopping TeamSpeak 3 Server" - - start-stop-daemon --stop --quiet \ - --pidfile "/var/run/teamspeak3-server/server.pid" - - eend $? -} - restart() { - svc_stop + stop sleep 3 - svc_start + start } diff --git a/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.0.11.3.ebuild b/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.0.11.3.ebuild index 69492d5..f573f44 100644 --- a/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.0.11.3.ebuild +++ b/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.0.11.3.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ +# $Id$ -EAPI="5" +EAPI=5 inherit eutils multilib systemd user versionator @@ -31,6 +31,8 @@ RESTRICT="installsources fetch mirror strip" S="${WORKDIR}/teamspeak3-server_linux-${ARCH}" +QA_PREBUILT="/opt/*" + pkg_nofetch() { elog "Please download ${A}" elog "from ${HOMEPAGE}?page=downloads and place this" @@ -50,7 +52,7 @@ src_install() { into ${opt_dir} insinto ${opt_dir} exeinto ${opt_dir} - newsbin ts3server_linux_${ARCH} ts3server-bin + newsbin ts3server_linux_${ARCH} ts3server-bin doexe *.sh doins *.so # 'libmariadb.so.2' is hard-coded into the ts3-server binary :( @@ -59,8 +61,9 @@ src_install() { # Install documentation and tsdns. dodoc -r CHANGELOG doc/*.txt - use doc && dodoc -r serverquerydocs - use pdf && dodoc doc/*.pdf + use doc && dodoc -r serverquerydocs doc/*.pdf && \ + docompress -x /usr/share/doc/${PF}/serverquerydocs && \ + dosym ../../usr/share/doc/${PF}/serverquerydocs ${opt_dir}/serverquerydocs if use tsdns; then newsbin tsdns/tsdnsserver_linux_${ARCH} tsdnsserver @@ -72,19 +75,18 @@ src_install() { # Install the runtime FS layout. insinto /etc/teamspeak3-server - doins "${FILESDIR}"/server.conf - use mysql && doins "${FILESDIR}"/ts3db_mariadb.ini - keepdir /{etc,var/{lib,log,run}}/teamspeak3-server + doins "${FILESDIR}"/server.conf "${FILESDIR}"/ts3db_mariadb.ini + keepdir /{etc,var/{lib,log}}/teamspeak3-server # Install the init script and systemd unit. - newinitd "${FILESDIR}"/${PN}.rc teamspeak3-server + newinitd "${FILESDIR}"/${PN}-init-r1 teamspeak3-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 + fowners teamspeak3 /{etc,var/{lib,log}}/teamspeak3-server fowners teamspeak3 ${opt_dir} - fperms 700 /{etc,var/{lib,log,run}}/teamspeak3-server + fperms 700 /{etc,var/{lib,log}}/teamspeak3-server fperms 755 ${opt_dir} }