From 52eb46185d46aab2d1f14e2961c5f6f7e9cc988b 2014-03-20 11:11:30 From: Richard H Date: 2014-03-20 11:11:30 Subject: [PATCH] add teamviewer:9 to tree --- diff --git a/net-misc/teamviewer/Manifest b/net-misc/teamviewer/Manifest new file mode 100644 index 0000000000000000000000000000000000000000..da15c8d6a2d6dd38181869acedfc6ba7aec13a6b --- /dev/null +++ b/net-misc/teamviewer/Manifest @@ -0,0 +1,4 @@ +AUX teamviewer-9.0.24147-gentoo.patch 3130 SHA256 9d4e25fd7b6935284d6ba538819ee59520798fd5c6ef666eb98096f1089b8c20 SHA512 f3e5c7f0fcb7f91b2e4e239bb857df4e4451ae36d0d493c2ee7441c9835f62a79be1d0f8b9e62ba97273c7dc5081e64d7df918e7d15725bc804b94177716ba4f WHIRLPOOL 57b2b21a0d66e2a9def7f2aa993946f9f9855c315494cdb181d82027d3043c2ba31e07fa936a66bae2c479eca5a6f583d5dba6165fe39c164055e52e19ec7ef7 +AUX teamviewerd.init 600 SHA256 769f1455cb9b43d9a8907bd7b594db2af7d3905ca40c795ce0bbb4e016219bd8 SHA512 c79d8abb0c3f8623b6c063cd6775aacd362bce6ad245f11bba7fc868e601d62f163e1a2d0e9ec2d748565c031ce471e42a70aab88f8276aa74e22a44b7a7d46d WHIRLPOOL 7bf69e2c0b4e578b5b029265686f416d57d12ea6130c169846bd5843cb8b5e3ac337fe971883803f11ad90b87671b84b1f3132041087fedddea2d9d866086ec8 +DIST teamviewer-9.0.24147.deb 22324414 SHA256 f3a735a9a161458224386b92d3f91307b6c850ca3f9b7b5db3ec3d4bb48930c4 SHA512 22499ab94ddb6133fefaa76f55148233ce29e571a3982df4c964478e1f4714778acd4a8184bd7cf9ef16565471b1fc4296475f19c94a3673daf8b6c730371997 WHIRLPOOL 0a8f264c569f0eeff1d1fd55191b6d446cee22cc3a6415704b2f553d067c772ad707232544865b66ad2781b27b35a327b74291cbc1f6a74329a747e756a86899 +EBUILD teamviewer-9.0.24147.ebuild 3784 SHA256 a55e993f9cf52897e77ef38204c4da345e440bb9e79b7e9860b73476581cd81d SHA512 2e41136920211c6f6ea4974c5b269edf97281822e5edc59cf480b7940079a99ba136ba3fe3672b9578b8870aa8ec5eea3330700d50a50df452646fd11dd7edc6 WHIRLPOOL 638caa2636289ea3be063e428e29688808b65931d78f14264dbb603f517d6d01182524bd9c3af3e6a8e92d2108dd7227f9af9ded8c0645ce4e3d4130f4fcc862 diff --git a/net-misc/teamviewer/files/teamviewer-9.0.24147-gentoo.patch b/net-misc/teamviewer/files/teamviewer-9.0.24147-gentoo.patch new file mode 100644 index 0000000000000000000000000000000000000000..44011f62ab87e500271c67fe60b95af5eebbc399 --- /dev/null +++ b/net-misc/teamviewer/files/teamviewer-9.0.24147-gentoo.patch @@ -0,0 +1,118 @@ +diff --git a/opt/teamviewer9/tv_bin/script/tvw_extra b/opt/teamviewer9/tv_bin/script/tvw_extra +index ae90b2d..f7ce7c1 100644 +--- a/opt/teamviewer9/tv_bin/script/tvw_extra ++++ b/opt/teamviewer9/tv_bin/script/tvw_extra +@@ -31,20 +31,9 @@ function PrintInfo() + { + PrintVersion + echo +- PrintDaemonStatus +- echo + PrintTeamViewerID + } + +-function PrintDaemonStatus() +-{ +- local cmd="$(daemonCtl 'status')" +- local txt="$(eval "$cmd")" +- [ $? = 0 ] || txt='n/a (error)' +- +- ABecho "teamviewerd status" "$txt" +-} +- + function PrintTeamViewerID() + { + local config="$TV_BASE_DIR/config/global.conf" +@@ -55,18 +44,18 @@ function PrintTeamViewerID() + if [ -n "$tvid" ]; then + ABecho "TeamViewer ID:" "$tvid" + else +- echo "TeamViewer ID: not found" +- echo "Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)" ++ echo "Try restarting the TeamViewer daemon." + fi + } + + function SetPasswd() + { ++ echo "Stop your teamviewer daemon first, then press enter." ++ read ++ + local pwd="$1" + [ -n "$pwd" ] || die 'no password specified' + +- Run_Daemon 'stop' > /dev/null +- + $TV_BIN_DIR/teamviewerd --passwd "$pwd" + case $? in + 0 ) echo 'ok' ;; +@@ -76,18 +65,18 @@ function SetPasswd() + * ) echo 'unknown response' ;; + esac + +- Run_Daemon 'start' || die 'failed to restart the daemon' +- echo ++ echo "You may start your teamviewer daemon again." + } + + function ExportLicense() + { ++ echo "Stop your teamviewer daemon first, then press enter." ++ read ++ + local license="$1" + local path='/tmp/tv_global.conf' + + [ -n "$license" ] || die 'no license specified' +- +- Run_Daemon 'stop' > /dev/null + + $TV_BIN_DIR/teamviewerd --export-license "$license" "$path" + case $? in +@@ -96,8 +85,7 @@ function ExportLicense() + * ) echo 'unknown response' ;; + esac + +- Run_Daemon 'start' || die 'failed to restart the daemon' +- echo ++ echo "You may start your teamviewer daemon again." + } + + function CreateZipLog() +diff --git a/opt/teamviewer9/tv_bin/script/tvw_main b/opt/teamviewer9/tv_bin/script/tvw_main +index cb4553a..7fe6571 100644 +--- a/opt/teamviewer9/tv_bin/script/tvw_main ++++ b/opt/teamviewer9/tv_bin/script/tvw_main +@@ -4,7 +4,6 @@ source "$TV_SCRIPT_DIR/tvw_aux" + source "$TV_SCRIPT_DIR/tvw_config" + source "$TV_SCRIPT_DIR/tvw_exec" + source "$TV_SCRIPT_DIR/tvw_extra" +-source "$TV_SCRIPT_DIR/tvw_daemon" + source "$TV_SCRIPT_DIR/tvw_profile" + + +@@ -19,7 +18,6 @@ function Main() + --help ) PrintHelp ;; + --version ) PrintVersion ;; + --info ) PrintInfo ;; +- --daemon ) Run_Daemon $opt ;; + --winecfg ) shift; Run_WineCfg "$@" ;; + --regedit ) shift; Run_RegEdit "$@" ;; + --kill ) Run_KillTeamViewer ;; +@@ -149,16 +147,3 @@ function Run_RegEdit() + Init + wine regedit "$@" + } +- +-function Run_Daemon() +-{ +- local opt="$1" +- +- case "$opt" in +- ( disable ) removeDaemon || rootSuggest ;; +- ( enable ) installDaemon || rootSuggest ;; +- ( start | stop | restart ) cmdDaemon $opt || rootSuggest ;; +- ( status ) cmdDaemon $opt ;; +- ( * ) echo "unknown option '$opt'" ;; +- esac +-} diff --git a/net-misc/teamviewer/files/teamviewerd.init b/net-misc/teamviewer/files/teamviewerd.init new file mode 100644 index 0000000000000000000000000000000000000000..e45c5c099897fde0df42b41384964ce64b526464 --- /dev/null +++ b/net-misc/teamviewer/files/teamviewerd.init @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/teamviewer/files/teamviewerd.init,v 1.2 2013/04/18 13:08:45 hasufell Exp $ + +description="daemon for TeamViewer" + +PIDFILE="/var/run/teamviewerd.pid" + +start() { + ebegin "Starting Teamviewer Daemon" + + start-stop-daemon \ + --start \ + --pidfile "${PIDFILE}" \ + --background \ + --exec /opt/teamviewer@TVV@/teamviewerd -- -d +} + +stop() { + ebegin "Stopping Teamviewer Daemon" + + start-stop-daemon \ + --stop \ + --pidfile "${PIDFILE}" +} diff --git a/net-misc/teamviewer/teamviewer-9.0.24147.ebuild b/net-misc/teamviewer/teamviewer-9.0.24147.ebuild new file mode 100644 index 0000000000000000000000000000000000000000..cb49c43ba5191de538612d86c623793de86e7554 --- /dev/null +++ b/net-misc/teamviewer/teamviewer-9.0.24147.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/teamviewer/teamviewer-8.0.20931.ebuild,v 1.1 2013/09/21 19:52:20 hasufell Exp $ + +EAPI=5 + +inherit eutils gnome2-utils systemd unpacker + +# Major version +MV=${PV/\.*} +MY_PN=${PN}${MV} +DESCRIPTION="All-In-One Solution for Remote Access and Support over the Internet" +HOMEPAGE="http://www.teamviewer.com" +SRC_URI="http://www.teamviewer.com/download/version_${MV}x/teamviewer_linux.deb -> ${P}.deb" + +LICENSE="TeamViewer !system-wine? ( LGPL-2.1 )" +SLOT=${MV} +KEYWORDS="~amd64 ~x86" +IUSE="system-wine" + +RESTRICT="mirror" + +RDEPEND=" + app-shells/bash + x11-misc/xdg-utils + !system-wine? ( + amd64? ( + app-emulation/emul-linux-x86-baselibs + app-emulation/emul-linux-x86-soundlibs + || ( + ( + x11-libs/libSM[abi_x86_32] + x11-libs/libX11[abi_x86_32] + x11-libs/libXau[abi_x86_32] + x11-libs/libXdamage[abi_x86_32] + x11-libs/libXext[abi_x86_32] + x11-libs/libXfixes[abi_x86_32] + x11-libs/libXtst[abi_x86_32] + ) + app-emulation/emul-linux-x86-xlibs + ) + ) + x86? ( + sys-libs/zlib + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXau + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXtst + ) + ) + system-wine? ( app-emulation/wine )" + +QA_PREBUILT="opt/teamviewer${MV}/*" + +S=${WORKDIR}/opt/teamviewer${MV}/tv_bin + +make_winewrapper() { + cat << EOF > "${T}/${MY_PN}" +#!/bin/sh +export WINEDLLPATH=/opt/${MY_PN} +exec wine "/opt/${MY_PN}/TeamViewer.exe" "\$@" +EOF + chmod go+rx "${T}/${MY_PN}" + exeinto /opt/bin + doexe "${T}/${MY_PN}" +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + + sed \ + -e "s/@TVV@/${MV}/g" \ + "${FILESDIR}"/${PN}d.init > "${T}"/${PN}d${MV} || die + + sed \ + -e "s#/opt/teamviewer9/tv_bin/teamviewerd#/opt/${MY_PN}/teamviewerd#" \ + script/${PN}d.service > "${T}"/${PN}d${MV}.service || die +} + +src_install () { + if use system-wine ; then + make_winewrapper + exeinto /opt/${MY_PN} + doexe wine/drive_c/TeamViewer/* + else + # install scripts and .reg + insinto /opt/${MY_PN}/script + doins script/*.reg + exeinto /opt/${MY_PN}/script + doexe script/teamviewer{,_desktop} script/tvw_{aux,config,exec,extra,main,profile} + + # install internal wine + insinto /opt/${MY_PN} + doins -r wine + dosym /opt/${MY_PN}/script/${PN} /opt/bin/${MY_PN} + + # fix permissions + fperms 755 /opt/${MY_PN}/wine/bin/wine{,-preloader,server} + fperms 755 /opt/${MY_PN}/wine/drive_c/TeamViewer/TeamViewer.exe + find "${D}"/opt/${MY_PN} -type f -name "*.so*" -execdir chmod 755 '{}' \; + fi + + # necessary symlinks + dosym ./script/teamviewer /opt/${MY_PN}/TeamViewer + dosym ./script/teamviewer_desktop /opt/${MY_PN}/TeamViewer_Desktop + + # install daemon binary + exeinto /opt/${MY_PN} + doexe ${PN}d + + # set up logdir + keepdir /var/log/${MY_PN} + dosym /var/log/${MY_PN} /opt/${MY_PN}/logfiles + + # set up config dir + keepdir /etc/${MY_PN} + dosym /etc/${MY_PN} /opt/${MY_PN}/config + + doinitd "${T}"/${PN}d${MV} + systemd_dounit "${T}"/${PN}d${MV}.service + + newicon -s 48 desktop/${PN}.png ${MY_PN}.png + dodoc ../doc/linux_FAQ_{EN,DE}.txt + make_desktop_entry ${MY_PN} TeamViewer ${MY_PN} +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update + + if use system-wine ; then + echo + eerror "IMPORTANT NOTICE!" + elog "Using ${PN} with system wine is not supported and experimental." + elog "Do not report gentoo bugs while using this version." + echo + fi + + eerror "STARTUP NOTICE:" + elog "You cannot start the daemon via \"teamviewer --daemon start\"." + elog "Instead use the provided gentoo initscript:" + elog " /etc/init.d/${PN}d${MV} start" + elog + elog "Logs are written to \"/var/log/teamviewer9\"" + +} + +pkg_postrm() { + gnome2_icon_cache_update +}