iit commit of teamviewer9
Package-Manager: portage-2.2.8-r1 RepoMan-Options: --force
This commit is contained in:
183
net-misc/teamviewer/files/teamviewer-7.0.9377-POSIX.patch
Normal file
183
net-misc/teamviewer/files/teamviewer-7.0.9377-POSIX.patch
Normal file
@@ -0,0 +1,183 @@
|
||||
From: Julian Ospald <hasufell@gentoo.org>
|
||||
Date: Tue Feb 19 21:24:39 UTC 2013
|
||||
Subject: make scripts POSIX compliant
|
||||
|
||||
--- teamviewer7/.tvscript/.regedit
|
||||
+++ teamviewer7/.tvscript/.regedit
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
TV_script_dir="$(dirname "$(readlink -f "$0")")"
|
||||
"$TV_script_dir/wrapper" wine regedit "$@"
|
||||
--- teamviewer7/.tvscript/.winecfg
|
||||
+++ teamviewer7/.tvscript/.winecfg
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
TV_script_dir="$(dirname "$(readlink -f "$0")")"
|
||||
"$TV_script_dir/wrapper" wine winecfg "$@"
|
||||
--- teamviewer7/.tvscript/killteamviewer
|
||||
+++ teamviewer7/.tvscript/killteamviewer
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
# execute wineserver -k for all users running a TeamViewer
|
||||
# (if not called by root, only successful for the current user)
|
||||
|
||||
--- teamviewer7/.tvscript/teamviewer
|
||||
+++ teamviewer7/.tvscript/teamviewer
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
TV_script_dir="$(dirname "$(readlink -f "$0")")"
|
||||
"$TV_script_dir/wrapper" wine "c:\Program Files\TeamViewer\Version7\TeamViewer.exe" "$@"
|
||||
--- teamviewer7/.tvscript/wrapper
|
||||
+++ teamviewer7/.tvscript/wrapper
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
TV_script_dir="$(dirname "$(readlink -f "$0")")"
|
||||
TV_base_dir="$(dirname "$TV_script_dir")"
|
||||
@@ -23,7 +23,7 @@
|
||||
export WINESERVER="$TV_Wine_bin/wineserver"
|
||||
|
||||
|
||||
-function tv_Prepare()
|
||||
+tv_Prepare()
|
||||
{
|
||||
exec 2>&1 # redirect stderr
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
setup_env
|
||||
}
|
||||
|
||||
-function tv_Run()
|
||||
+tv_Run()
|
||||
{
|
||||
exec 2>&1 # redirect stderr
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"$TV_Wine_bin/$binary" "$@"
|
||||
}
|
||||
|
||||
-function tv_LogInfo()
|
||||
+tv_LogInfo()
|
||||
{
|
||||
exec 2>&1 # redirect stderr
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
echo " "
|
||||
}
|
||||
|
||||
-function setup_wine()
|
||||
+setup_wine()
|
||||
{
|
||||
# setup dosdevices and symlinks
|
||||
local c_sym="$WINEPREFIX/dosdevices/c:"
|
||||
@@ -88,14 +88,14 @@
|
||||
}
|
||||
|
||||
# ensure path exists
|
||||
-function make_path()
|
||||
+make_path()
|
||||
{
|
||||
local path="$1"
|
||||
[ -d "$path" ] || mkdir -p "$path" || die "Could not create $path"
|
||||
}
|
||||
|
||||
# setup/validate drive symlinks
|
||||
-function setup_drive_symlink()
|
||||
+setup_drive_symlink()
|
||||
{
|
||||
local sym="$1"
|
||||
local dst="$2"
|
||||
@@ -107,7 +107,7 @@
|
||||
}
|
||||
|
||||
# setup logfile symlinks
|
||||
-function setup_log_symlink
|
||||
+setup_log_symlink()
|
||||
{
|
||||
local cuser=$(id -un)
|
||||
local basepath="$WINEPREFIX/drive_c/users/$cuser"
|
||||
@@ -129,7 +129,7 @@
|
||||
}
|
||||
|
||||
# setup/validate win symlinks
|
||||
-function setup_win_symlink()
|
||||
+setup_win_symlink()
|
||||
{
|
||||
local sym="$WINEPREFIX/$1"
|
||||
local dst="$TV_Wine_dir/$1"
|
||||
@@ -141,7 +141,7 @@
|
||||
[ -d $(readlink -f "$sym") ] || ln -s "$dst" "$sym" || die "Could not create $sym (link to $dst)"
|
||||
}
|
||||
|
||||
-function setup_prog_dir()
|
||||
+setup_prog_dir()
|
||||
{
|
||||
local progdir="$WINEPREFIX/drive_c/Program Files/TeamViewer/Version7"
|
||||
local progsrc="$TV_Wine_dir/drive_c/Program Files/TeamViewer/Version7"
|
||||
@@ -158,7 +158,7 @@
|
||||
done
|
||||
}
|
||||
|
||||
-function setup_wine_tweaks()
|
||||
+setup_wine_tweaks()
|
||||
{
|
||||
# Enable Subpixel Hinting
|
||||
if ! [ -e "$WINEPREFIX/.set_fontsmooth" ] ; then
|
||||
@@ -191,7 +191,7 @@
|
||||
fi
|
||||
}
|
||||
|
||||
-function setup_tar_env()
|
||||
+setup_tar_env()
|
||||
{
|
||||
local dsrc="$TV_script_dir/teamviewer.desktop.template"
|
||||
local ddst="$TV_script_dir/teamviewer.desktop"
|
||||
@@ -210,7 +210,7 @@
|
||||
fi
|
||||
}
|
||||
|
||||
-function setup_env()
|
||||
+setup_env()
|
||||
{
|
||||
local tvwine="$TV_Wine_dir/drive_c/Program Files/TeamViewer/Version7/tvwine.dll.so"
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
(cd /etc; ls -m *-release *-version *_version > "$TV_profile/drive_c/distrelease" 2> /dev/null)
|
||||
}
|
||||
|
||||
-function validate_user()
|
||||
+validate_user()
|
||||
{
|
||||
local userid=$(id -un)
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
fi
|
||||
}
|
||||
|
||||
-function validate_binary()
|
||||
+validate_binary()
|
||||
{
|
||||
local binary="$1"
|
||||
|
||||
@@ -245,9 +245,11 @@
|
||||
fi
|
||||
}
|
||||
|
||||
-function die()
|
||||
+die()
|
||||
{
|
||||
- echo -e "\nError: $@\n"
|
||||
+ echo
|
||||
+ echo "Error: $@"
|
||||
+ echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
135
net-misc/teamviewer/files/teamviewer-8.0.20931-gentoo.patch
Normal file
135
net-misc/teamviewer/files/teamviewer-8.0.20931-gentoo.patch
Normal file
@@ -0,0 +1,135 @@
|
||||
commit d3060b46b357c399d522e8346dd6c9b99c322343
|
||||
Author: hasufell <hasufell@gentoo.org>
|
||||
Date: Sat Sep 21 20:08:07 2013 +0200
|
||||
|
||||
remove all daemon/systemd related bits
|
||||
|
||||
diff --git a/script/tvw_main b/script/tvw_main
|
||||
index bdff58b..1058d47 100644
|
||||
--- a/script/tvw_main
|
||||
+++ b/script/tvw_main
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
source "$TV_SCRIPT_DIR/tvw_config"
|
||||
source "$TV_SCRIPT_DIR/tvw_aux"
|
||||
-source "$TV_SCRIPT_DIR/tvw_daemon"
|
||||
source "$TV_SCRIPT_DIR/tvw_profile"
|
||||
|
||||
|
||||
@@ -17,7 +16,6 @@ function Main()
|
||||
--help ) PrintHelp ;;
|
||||
--version ) PrintVersion ;;
|
||||
--info ) PrintInfo ;;
|
||||
- --daemon ) Run_Daemon $opt ;;
|
||||
--winecfg ) shift; Run_WineCfg "$@" ;;
|
||||
--regedit ) shift; Run_RegEdit "$@" ;;
|
||||
--kill ) Run_KillTeamViewer ;;
|
||||
@@ -174,26 +172,14 @@ function Run_RegEdit()
|
||||
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
|
||||
-}
|
||||
-
|
||||
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' ;;
|
||||
@@ -203,19 +189,19 @@ 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
|
||||
0 ) echo "ok - license exported to '$path'" ;;
|
||||
@@ -223,8 +209,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()
|
||||
@@ -265,20 +250,12 @@ function PrintHelp()
|
||||
ABecho "teamviewer --passwd [PASSWD]" "set a password (useful when installing remote (ssh)"
|
||||
ABecho "teamviewer --ziplog" "create a zip containing all teamviewer logs (useful when contacting support)"
|
||||
echo
|
||||
- ABecho "teamviewer --daemon status" "show current status of the TeamViewer daemon"
|
||||
- ABecho "teamviewer --daemon start" "start TeamViewer daemon"
|
||||
- ABecho "teamviewer --daemon stop" "stop TeamViewer daemon"
|
||||
- ABecho "teamviewer --daemon restart" "stop/start TeamViewer daemon"
|
||||
- ABecho "teamviewer --daemon disable" "disable TeamViewer daemon - don't start daemon on system startup"
|
||||
- ABecho "teamviewer --daemon enable" "enable TeamViewer daemon - start daemon on system startup (default)"
|
||||
}
|
||||
|
||||
function PrintInfo()
|
||||
{
|
||||
PrintVersion
|
||||
echo
|
||||
- PrintDaemonStatus
|
||||
- echo
|
||||
PrintTeamViewerID
|
||||
}
|
||||
|
||||
@@ -287,15 +264,6 @@ function PrintVersion()
|
||||
ABecho "TeamViewer" "$TV_VERSION"
|
||||
}
|
||||
|
||||
-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"
|
||||
@@ -307,6 +275,6 @@ function PrintTeamViewerID()
|
||||
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
|
||||
}
|
||||
91
net-misc/teamviewer/files/teamviewer-9.0.27891-gentoo.patch
Normal file
91
net-misc/teamviewer/files/teamviewer-9.0.27891-gentoo.patch
Normal file
@@ -0,0 +1,91 @@
|
||||
diff -uNr opt.orig/teamviewer9/tv_bin/script/tvw_extra opt/teamviewer9/tv_bin/script/tvw_extra
|
||||
--- opt.orig/teamviewer9/tv_bin/script/tvw_extra 2014-05-08 22:56:31.914099956 +0200
|
||||
+++ opt/teamviewer9/tv_bin/script/tvw_extra 2014-05-08 23:09:39.484253974 +0200
|
||||
@@ -34,24 +34,9 @@
|
||||
{
|
||||
PrintVersion
|
||||
echo
|
||||
- PrintDaemonStatus
|
||||
- echo
|
||||
PrintTeamViewerID
|
||||
}
|
||||
|
||||
-function PrintDaemonStatus()
|
||||
-{
|
||||
- local cmd="$(daemonCtl 'status')"
|
||||
- local txt="n/a"
|
||||
-
|
||||
- if [ isInstalledTV ] ; then
|
||||
- txt="$(eval "$cmd")"
|
||||
- [ $? = 0 ] || txt='n/a (error)'
|
||||
- fi
|
||||
-
|
||||
- ABecho "teamviewerd status" "$txt"
|
||||
-}
|
||||
-
|
||||
function PrintTeamViewerID()
|
||||
{
|
||||
local config="$TV_BASE_DIR/config/global.conf"
|
||||
@@ -61,20 +46,19 @@
|
||||
[ -e "$config" ] && tvid=$( grep 'ClientID' "$config" | cut --delimiter='=' -f2 )
|
||||
[ -n "$tvid" ] && txt="$tvid"
|
||||
|
||||
- ABecho "TeamViewer ID:" "$tvid"
|
||||
-
|
||||
if [ -z "$tvid" ] && isInstalledTV; then
|
||||
- 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' ;;
|
||||
diff -uNr opt.orig/teamviewer9/tv_bin/script/tvw_main opt/teamviewer9/tv_bin/script/tvw_main
|
||||
--- opt.orig/teamviewer9/tv_bin/script/tvw_main 2014-05-08 22:56:31.914099956 +0200
|
||||
+++ opt/teamviewer9/tv_bin/script/tvw_main 2014-05-08 23:10:36.803537385 +0200
|
||||
@@ -4,7 +4,6 @@
|
||||
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 @@
|
||||
--help ) PrintHelp ;;
|
||||
--version ) PrintVersion ;;
|
||||
--info ) PrintInfo ;;
|
||||
- --daemon ) Run_Daemon $opt ;;
|
||||
--winecfg ) shift; Run_WineCfg "$@" ;;
|
||||
--regedit ) shift; Run_RegEdit "$@" ;;
|
||||
--kill ) Run_KillTeamViewer ;;
|
||||
@@ -166,18 +164,3 @@
|
||||
Init
|
||||
wine regedit "$@"
|
||||
}
|
||||
-
|
||||
-function Run_Daemon()
|
||||
-{
|
||||
- local opt="$1"
|
||||
-
|
||||
- installedTVorDie
|
||||
-
|
||||
- case "$opt" in
|
||||
- ( disable ) removeDaemon || rootSuggest ;;
|
||||
- ( enable ) installDaemon || rootSuggest ;;
|
||||
- ( start | stop | restart ) cmdDaemon $opt || rootSuggest ;;
|
||||
- ( status ) cmdDaemon $opt ;;
|
||||
- ( * ) echo "unknown option '$opt'" ;;
|
||||
- esac
|
||||
-}
|
||||
26
net-misc/teamviewer/files/teamviewerd.init
Normal file
26
net-misc/teamviewer/files/teamviewerd.init
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 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}"
|
||||
}
|
||||
Reference in New Issue
Block a user