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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Feb 21 15:51:17 2013 UTC (6 years, 9 months ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
add systemd unit file

(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/teamviewer/teamviewer-8.0.17147.ebuild,v 1.2 2013/02/21 14:33:17 hasufell Exp $
4
5 EAPI=5
6
7 inherit eutils gnome2-utils
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 x11-misc/xdg-utils
25 !system-wine? (
26 amd64? (
27 app-emulation/emul-linux-x86-baselibs
28 app-emulation/emul-linux-x86-soundlibs
29 app-emulation/emul-linux-x86-xlibs
30 )
31 x86? (
32 sys-libs/zlib
33 x11-libs/libSM
34 x11-libs/libX11
35 x11-libs/libXau
36 x11-libs/libXdamage
37 x11-libs/libXext
38 x11-libs/libXfixes
39 x11-libs/libXtst
40 )
41 )
42 system-wine? ( app-emulation/wine )"
43
44 QA_PREBUILT="opt/teamviewer-${MV}/*"
45
46 S=${WORKDIR}/opt/teamviewer${MV}/tv_bin
47
48 make_winewrapper() {
49 cat << EOF > "${T}/${MY_PN}"
50 #!/bin/sh
51 export WINEDLLPATH=/opt/${MY_PN}
52 exec wine "/opt/${MY_PN}/TeamViewer.exe" "\$@"
53 EOF
54 chmod go+rx "${T}/${MY_PN}"
55 exeinto /opt/bin
56 doexe "${T}/${MY_PN}"
57 }
58
59 src_unpack() {
60 default
61 unpack ./data.tar.gz
62 }
63
64 src_prepare() {
65 epatch "${FILESDIR}"/${P}-POSIX.patch \
66 "${FILESDIR}"/${P}-gentoo.patch
67
68 sed \
69 -e "s/@TVV@/${MV}/g" \
70 "${FILESDIR}"/${PN}d.init > "${T}"/${PN}d-${MV} || die
71 }
72
73 src_install () {
74 if use system-wine ; then
75 make_winewrapper
76 exeinto /opt/${MY_PN}
77 doexe wine/drive_c/TeamViewer/*
78 else
79 # install scripts and .reg
80 insinto /opt/${MY_PN}/script
81 doins script/*.reg
82 exeinto /opt/${MY_PN}/script
83 doexe script/teamviewer{,_desktop} script/tvw_{aux,config,main,profile}
84
85 # install internal wine
86 insinto /opt/${MY_PN}
87 doins -r wine
88 dosym /opt/${MY_PN}/script/${PN} /opt/bin/${MY_PN}
89
90 # fix permissions
91 fperms 755 /opt/${MY_PN}/wine/bin/wine{,-preloader,server}
92 fperms 755 /opt/${MY_PN}/wine/drive_c/TeamViewer/TeamViewer{,_Desktop}.exe
93 find "${D}"/opt/${MY_PN} -type f -name "*.so*" -execdir chmod 755 '{}' \;
94 fi
95
96 # install daemon binary
97 exeinto /opt/${MY_PN}
98 doexe ${PN}d
99
100 doinitd "${T}"/${PN}d-${MV}
101
102 newicon -s 48 desktop/${PN}.png ${MY_PN}.png
103 dodoc ../linux_FAQ_{EN,DE}.txt
104 make_desktop_entry ${MY_PN} TeamViewer-${MV} ${MY_PN}
105 }
106
107 pkg_preinst() {
108 gnome2_icon_savelist
109 }
110
111 pkg_postinst() {
112 gnome2_icon_cache_update
113
114 if use system-wine ; then
115 echo
116 eerror "IMPORTANT NOTICE!"
117 elog "Using ${PN} with system wine is not supported and experimental."
118 elog "Do not report gentoo bugs while using this version."
119 echo
120 fi
121
122 ewarn "STARTUP NOTICE:"
123 elog "You cannot start the daemon via \"teamviewer --daemon start\"."
124 elog "Instead use the provided gentoo initscript:"
125 elog " /etc/init.d/${PN}d-${MV} start"
126 elog
127 elog "Logs are written to \"~/.config/teamviewer8/logfiles\""
128 }
129
130 pkg_postrm() {
131 gnome2_icon_cache_update
132 }

  ViewVC Help
Powered by ViewVC 1.1.20