/[gentoo-x86]/net-misc/teamviewer/teamviewer-9.0.30203.ebuild
Gentoo

Contents of /net-misc/teamviewer/teamviewer-9.0.30203.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Mar 14 18:05:51 2015 UTC (4 years, 8 months ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Drop old versions that require emul-linux-x86 packages.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/teamviewer/teamviewer-9.0.30203.ebuild,v 1.1 2014/07/16 16:14:55 hasufell Exp $
4
5 EAPI=5
6
7 inherit eutils gnome2-utils systemd unpacker
8
9 # Major version
10 MV=${PV/\.*}
11 MY_PN=${PN}${MV}
12 DESCRIPTION="All-In-One Solution for Remote Access and Support over the Internet"
13 HOMEPAGE="http://www.teamviewer.com"
14 SRC_URI="http://www.teamviewer.com/download/version_${MV}x/teamviewer_linux.deb -> ${P}.deb"
15
16 LICENSE="TeamViewer !system-wine? ( LGPL-2.1 )"
17 SLOT=${MV}
18 KEYWORDS="~amd64 ~x86"
19 IUSE="system-wine"
20
21 RESTRICT="mirror"
22
23 RDEPEND="
24 app-shells/bash
25 x11-misc/xdg-utils
26 !system-wine? (
27 amd64? (
28 app-emulation/emul-linux-x86-baselibs
29 app-emulation/emul-linux-x86-soundlibs
30 || (
31 (
32 x11-libs/libSM[abi_x86_32]
33 x11-libs/libX11[abi_x86_32]
34 x11-libs/libXau[abi_x86_32]
35 x11-libs/libXdamage[abi_x86_32]
36 x11-libs/libXext[abi_x86_32]
37 x11-libs/libXfixes[abi_x86_32]
38 x11-libs/libXtst[abi_x86_32]
39 )
40 app-emulation/emul-linux-x86-xlibs
41 )
42 )
43 x86? (
44 sys-libs/zlib
45 x11-libs/libSM
46 x11-libs/libX11
47 x11-libs/libXau
48 x11-libs/libXdamage
49 x11-libs/libXext
50 x11-libs/libXfixes
51 x11-libs/libXtst
52 )
53 )
54 system-wine? ( app-emulation/wine )"
55
56 QA_PREBUILT="opt/teamviewer${MV}/*"
57
58 S=${WORKDIR}/opt/teamviewer${MV}/tv_bin
59
60 make_winewrapper() {
61 cat << EOF > "${T}/${MY_PN}"
62 #!/bin/sh
63 export WINEDLLPATH=/opt/${MY_PN}
64 exec wine "/opt/${MY_PN}/TeamViewer.exe" "\$@"
65 EOF
66 chmod go+rx "${T}/${MY_PN}"
67 exeinto /opt/bin
68 doexe "${T}/${MY_PN}"
69 }
70
71 src_prepare() {
72 epatch "${FILESDIR}"/${P}-gentoo.patch
73
74 sed \
75 -e "s#@TVV@#${MV}/tv_bin#g" \
76 "${FILESDIR}"/${PN}d.init > "${T}"/${PN}d${MV} || die
77 }
78
79 src_install () {
80 if use system-wine ; then
81 make_winewrapper
82 exeinto /opt/${MY_PN}
83 doexe wine/drive_c/TeamViewer/*
84 else
85 # install scripts and .reg
86 insinto /opt/${MY_PN}/tv_bin
87 doins -r *
88
89 exeinto /opt/${MY_PN}/tv_bin
90 doexe TeamViewer_Desktop
91 exeinto /opt/${MY_PN}/tv_bin/script
92 doexe script/teamviewer script/tvw_{aux,config,exec,extra,main,profile}
93
94 dosym /opt/${MY_PN}/tv_bin/script/${PN} /opt/bin/${MY_PN}
95
96 # fix permissions
97 fperms 755 /opt/${MY_PN}/tv_bin/wine/bin/wine{,-preloader,server}
98 fperms 755 /opt/${MY_PN}/tv_bin/wine/drive_c/TeamViewer/TeamViewer.exe
99 find "${D}"/opt/${MY_PN} -type f -name "*.so*" -execdir chmod 755 '{}' \;
100 fi
101
102 # install daemon binary
103 exeinto /opt/${MY_PN}/tv_bin
104 doexe ${PN}d
105
106 # set up logdir
107 keepdir /var/log/${MY_PN}
108 dosym /var/log/${MY_PN} /opt/${MY_PN}/logfiles
109
110 # set up config dir
111 keepdir /etc/${MY_PN}
112 dosym /etc/${MY_PN} /opt/${MY_PN}/config
113
114 doinitd "${T}"/${PN}d${MV}
115 systemd_newunit script/${PN}d.service ${PN}d${MV}.service
116
117 newicon -s 48 desktop/${PN}.png ${MY_PN}.png
118 dodoc ../doc/linux_FAQ_{EN,DE}.txt
119 make_desktop_entry ${MY_PN} TeamViewer ${MY_PN}
120 }
121
122 pkg_preinst() {
123 gnome2_icon_savelist
124 }
125
126 pkg_postinst() {
127 gnome2_icon_cache_update
128
129 if use system-wine ; then
130 echo
131 eerror "IMPORTANT NOTICE!"
132 elog "Using ${PN} with system wine is not supported and experimental."
133 elog "Do not report gentoo bugs while using this version."
134 echo
135 fi
136
137 eerror "STARTUP NOTICE:"
138 elog "You cannot start the daemon via \"teamviewer --daemon start\"."
139 elog "Instead use the provided gentoo initscript:"
140 elog " /etc/init.d/${PN}d${MV} start"
141 elog
142 elog "Logs are written to \"/var/log/teamviewer${MV}\""
143 }
144
145 pkg_postrm() {
146 gnome2_icon_cache_update
147 }

  ViewVC Help
Powered by ViewVC 1.1.20