app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / media-sound / teamspeak-client-bin / teamspeak-client-bin-3.0.19.1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit eutils unpacker
7
8 DESCRIPTION="TeamSpeak Client - Voice Communication Software"
9 HOMEPAGE="http://www.teamspeak.com/"
10 SRC_URI="
11         amd64? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/TeamSpeak3-Client-linux_amd64-${PV/_/-}.run )
12         x86? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/TeamSpeak3-Client-linux_x86-${PV/_/-}.run )"
13
14 LICENSE="teamspeak3"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="alsa pulseaudio"
18
19 REQUIRED_USE="|| ( alsa pulseaudio )"
20
21 RDEPEND="
22         dev-libs/quazip[-qt4,qt5]
23         >=dev-qt/qtcore-5.5:5
24         >=dev-qt/qtgui-5.5:5[accessibility]
25         >=dev-qt/qtnetwork-5.5:5
26         >=dev-qt/qtsql-5.5:5[sqlite]
27         >=dev-qt/qtwidgets-5.5:5
28         sys-libs/glibc
29         sys-libs/zlib
30         alsa? ( media-libs/alsa-lib )
31         pulseaudio? ( media-sound/pulseaudio )"
32
33 RESTRICT="mirror strip"
34
35 S="${WORKDIR}"
36
37 pkg_nofetch() {
38         elog "Please download ${A}"
39         elog "from ${HOMEPAGE}?page=downloads and place this"
40         elog "file in ${DISTDIR}"
41 }
42
43 src_prepare() {
44         # Remove the qt-libraries as they just cause trouble with the system's Qt, see bug #328807.
45         rm libQt* || die "Couldn't remove bundled Qt libraries."
46
47         rm -r platforms sqldrivers qt.conf || die "Couldn't remove bundle Qt files."
48
49         # Remove unwanted soundbackends.
50         if ! use alsa ; then
51                 rm soundbackends/libalsa* || die
52         fi
53
54         if ! use pulseaudio ; then
55                 rm soundbackends/libpulseaudio* || die
56         fi
57
58         # Remove quazip
59         rm libquazip.so || die
60
61         # Rename the tsclient to its shorter version, required by the teamspeak3 script we install.
62         mv ts3client_linux_* ts3client || die "Couldn't rename ts3client to its shorter version."
63 }
64
65 src_install() {
66         insinto /opt/teamspeak3-client
67         doins -r *
68
69         fperms +x /opt/teamspeak3-client/ts3client
70
71         dobin "${FILESDIR}/teamspeak3"
72
73         make_desktop_entry teamspeak3 TeamSpeak3 \
74                 "/opt/teamspeak3-client/pluginsdk/docs/client_html/images/logo.png" \
75                 Network
76 }