summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-02-20 02:39:15 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-02-20 02:39:15 +0000
commitf010acdb35c5b8d57e5170bcf93aa0644323e947 (patch)
tree10d4b896607036e6731fcf429be5c047036bc4bd /net-misc
parentadd TeamViewer license wrt #360499 (diff)
downloadgentoo-2-f010acdb35c5b8d57e5170bcf93aa0644323e947.tar.gz
gentoo-2-f010acdb35c5b8d57e5170bcf93aa0644323e947.tar.bz2
gentoo-2-f010acdb35c5b8d57e5170bcf93aa0644323e947.zip
initial import wrt #360499
(Portage version: 2.2.0_alpha162/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/teamviewer/ChangeLog14
-rw-r--r--net-misc/teamviewer/Manifest10
-rw-r--r--net-misc/teamviewer/files/teamviewer-7.0.9377-POSIX.patch183
-rw-r--r--net-misc/teamviewer/files/teamviewer-8.0.17147-POSIX.patch399
-rw-r--r--net-misc/teamviewer/files/teamviewer-8.0.17147-gentoo.patch135
-rw-r--r--net-misc/teamviewer/files/teamviewerd.init26
-rw-r--r--net-misc/teamviewer/metadata.xml16
-rw-r--r--net-misc/teamviewer/teamviewer-7.0.9377.ebuild111
-rw-r--r--net-misc/teamviewer/teamviewer-8.0.17147.ebuild132
9 files changed, 1026 insertions, 0 deletions
diff --git a/net-misc/teamviewer/ChangeLog b/net-misc/teamviewer/ChangeLog
new file mode 100644
index 000000000000..4304e9cca4e1
--- /dev/null
+++ b/net-misc/teamviewer/ChangeLog
@@ -0,0 +1,14 @@
+# ChangeLog for net-misc/teamviewer
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/teamviewer/ChangeLog,v 1.1 2013/02/20 02:39:15 hasufell Exp $
+
+*teamviewer-8.0.17147 (20 Feb 2013)
+*teamviewer-7.0.9377 (20 Feb 2013)
+
+ 20 Feb 2013; Julian Ospald <hasufell@gentoo.org> +teamviewer-7.0.9377.ebuild,
+ +files/teamviewer-7.0.9377-POSIX.patch, +teamviewer-8.0.17147.ebuild,
+ +files/teamviewer-8.0.17147-POSIX.patch,
+ +files/teamviewer-8.0.17147-gentoo.patch, +files/teamviewerd.init,
+ +metadata.xml:
+ initial import wrt #360499
+
diff --git a/net-misc/teamviewer/Manifest b/net-misc/teamviewer/Manifest
new file mode 100644
index 000000000000..2a0c46d48c96
--- /dev/null
+++ b/net-misc/teamviewer/Manifest
@@ -0,0 +1,10 @@
+AUX teamviewer-7.0.9377-POSIX.patch 3698 SHA256 fd595f395e0a66407c4bad2ee0d75a8f44bb39e89efc2b3ceaa5c71023024fd9 SHA512 67e9e82a606303501c0f8d4e06f06772322117b54c486c0516a593ce257961f866a4852ad677eef2a15e5714946a83d380e467519f4cc660a219f44abf8ca795 WHIRLPOOL 030ca9ee795eee371d9338fb2826b3f24617b0307c4f7a94127c921338ba335fe261bfc389cae12827b8f68deafb6852baa84664a7b3c16946670704521d49a7
+AUX teamviewer-8.0.17147-POSIX.patch 7930 SHA256 c90cc6e387ee7dde6af5bccead0d8e83a1eaad9fd4160849794e581b31561a63 SHA512 0064b53a4ddc6a75f9b498998487ec3e9eb7759a0634bbe52e5dd703cfe1cac1be1bd79576433f051f8646e679ea191c15851328fb4dc974ef2d9f54eeccbedf WHIRLPOOL 4a332445ce6e49495bc0e51911065b7f391346b57fb329b823c9497e6d0e034f3e884ddab1f6d142026715ea4078a4cf920c3a7fea0dfbd58e56c48034115e07
+AUX teamviewer-8.0.17147-gentoo.patch 3506 SHA256 858c886f92a9f52591403722afbf4324591cc5748c40c1d17706b71592bf2e5b SHA512 6fe0b44c758d8d77a7e0f5da2812c3c7c568687e771c8cf6a64e47aa832da6f82737e8b1dc69f2cab8073a7cb7b021d2e69ce3dc39ff62428fa87311467768c9 WHIRLPOOL 92d5aaf16e1bb44809c9747050fb6c859c3565069180701e25b2e28aed5a139494155fc7482a5bab39f421b864aa1a409617c9ccf6b36420b21bf34a474f2572
+AUX teamviewerd.init 495 SHA256 0087ec7ec9cd83fd6fb6c731a60a107ea243b24fbf65d5b4a652498494b0df14 SHA512 571c5885d1f5c4cf6a3f1a03b157f7747300b5b43963b68bc6fbb294cc363d27aae6aab33354e52a20fccf2a4b5174100da39d29e2e6e42bf8eed76aa0e225c7 WHIRLPOOL fe57262dcad67530575b4902488ee5c91dd6367b6f8227c394bc10ae8b1f1b10ae9f3acff52c0e8ec6f009c1a866888a268237d3be0a22186bf9491255efbed3
+DIST teamviewer-7.0.9377.tar.gz 18102617 SHA256 3eaa78cbbd49449f2dbe5be6f0af99535a039598867a537ea8230189251909b9 SHA512 cc959dc9d243be499dbd5781c979305787659fbc95f72f5cb5e05dc042006cf05e670e8feb88322a1adf74f1c58cdf8883c11945a5baff26b0a7a2a4e8b08a8b WHIRLPOOL 68cc97298d8f98b5021e39954f45167eb2b32ff3bd32aa38733120574dafcf13884e452823ccec9d73f3244989433919395ba6d357f714635a1a6276bd8fa855
+DIST teamviewer-8.0.17147.deb 18248582 SHA256 417891f49ecfb89c4b45d7c67294de71519a2c7693fe1a7b720123e44455653a SHA512 cd809e312cb8019a7ba9e1a22b3a182ae3f22bc8ac695f3569a258bb098d7f8851d5564150a75386ffdf8f94363edbac26d2ccfe2b3625bc34cd8a74dcbf86f8 WHIRLPOOL c75ea8682e9617cbac41a1664298728bbd85407d611c968bf640e58d8fb0fa5ae719aa529b564b2952f0fc39b10abb05ee7377fbae418eeba0535ab4b58331c5
+EBUILD teamviewer-7.0.9377.ebuild 2584 SHA256 ae87e90f2f07ccdb22f2676ff62ceb9444f9c022b2c4fa0fc5b2ae73d2ffdfe5 SHA512 c68b857030fcd432c4afef55591a71abd0c56e003aeafd6e8fde6f7992108fffc8ce8383f14a75e661d3427bf5127f4cf9ac309936e61ebf1e2ced83d3731a26 WHIRLPOOL d23541debbbc3666793cb9b0236838212ec454241ffb3e636906708c0847ad7c95d34e2451e3ea50c947ed5996f6ff30c350c37e7f54bc27142b4952ff40b0a7
+EBUILD teamviewer-8.0.17147.ebuild 2959 SHA256 794cd28c488f7a54dfc1e5a6cefd82dc4c512535fa29de1f1672af8d5419fed9 SHA512 0256608bde235cb591a61db262ea6709bc3f37d1893bc1823a34967c78d855b7a04f642faf62f11494992893c08f4a0db6f6c9450569962e4daa76015fc008d2 WHIRLPOOL 84a6ffd740cd79295a3931ac1db1162e2009d0639bcb6195ba421c2bd0b9186ce30cb999f85f23532ae4b8d89d3e46a0a71e796f3fa9c4ef10ee184086c40f74
+MISC ChangeLog 503 SHA256 55b762e84d381464952bb4908e8e4c3890c004e7c2bee9662fcd28021dd4f67a SHA512 fc975cbd3d2ee202cc91935cf0bd4dab46ca52deac40cda50c57745721bfedcbba17d9c8d1333f54784775d261a585b5676b02ddf5cc8c3c46bb7624d2f49fee WHIRLPOOL 71eb38e542d2e24223521008c3585fec4ca5637fddf3c73aa704c97abb9417d9eb155d0dab000c473afe7606d561edddb90a656a6710da1059e8e4d2669a98f1
+MISC metadata.xml 444 SHA256 639cdfda43bf7e000721768a1ea21f4f28b465aae9fc0f4b4ff46c1b55f6538a SHA512 a3b75ae69a85bd9eadeb0b58564b39486cc3f27b2588b76ed54529b03d3bd049ddeca4bf1552ceb26b58285e99fbd7b850814007365bb1e70d0c6c59aa64fea5 WHIRLPOOL 64614b52256d2dfdb9a7b94b33aaff022ceb52631bce602467422d7971339e26c5aef255c2f057d8157f00b53351f3a4f96dabbc6967f904611bf9853634ebbb
diff --git a/net-misc/teamviewer/files/teamviewer-7.0.9377-POSIX.patch b/net-misc/teamviewer/files/teamviewer-7.0.9377-POSIX.patch
new file mode 100644
index 000000000000..ebbe5cd71894
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewer-7.0.9377-POSIX.patch
@@ -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
+ }
+
diff --git a/net-misc/teamviewer/files/teamviewer-8.0.17147-POSIX.patch b/net-misc/teamviewer/files/teamviewer-8.0.17147-POSIX.patch
new file mode 100644
index 000000000000..b8c1413ffd78
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewer-8.0.17147-POSIX.patch
@@ -0,0 +1,399 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue Feb 19 22:58:46 UTC 2013
+Subject: make scripts POSIX compliant
+
+--- teamviewer8/tv_bin/script/teamviewer
++++ teamviewer8/tv_bin/script/teamviewer
+@@ -1,6 +1,6 @@
+-#!/bin/bash
++#!/bin/sh
+
+ TV_SCRIPT_DIR="$(dirname "$(readlink -e "$0")")"
+-source "$TV_SCRIPT_DIR/tvw_main"
++. "$TV_SCRIPT_DIR/tvw_main"
+
+ Main "$@"
+--- teamviewer8/tv_bin/script/teamviewer_desktop
++++ teamviewer8/tv_bin/script/teamviewer_desktop
+@@ -1,6 +1,6 @@
+-#!/bin/bash
++#!/bin/sh
+
+ TV_SCRIPT_DIR="$(dirname "$(readlink -e "$0")")"
+-source "$TV_SCRIPT_DIR/tvw_main"
++. "$TV_SCRIPT_DIR/tvw_main"
+
+ Run_TeamViewer_Desktop "$@"
+--- teamviewer8/tv_bin/script/tvw_aux
++++ teamviewer8/tv_bin/script/tvw_aux
+@@ -1,30 +1,34 @@
+-#!/bin/bash
++#!/bin/sh
+
+
+ # die with message
+-function die()
++die()
+ {
+- echo -e "\nError: $@\n"
++ echo
++ echo "Error: $@"
++ echo
+ exit 1
+ }
+
+-function ABecho()
++ABecho()
+ {
+ printf "\E[1m %-30s \E[0m %s \n" "$1" "$2"
+ }
+
+-function fail()
++fail()
+ {
+- echo -e "\nError: $@\n"
++ echo
++ echo "Error: $@"
++ echo
+ false
+ }
+
+-function cmdExists()
++cmdExists()
+ {
+ command -v "$1" >/dev/null 2>&1
+ }
+
+-function getInitCmd()
++getInitCmd()
+ {
+ #exec 2> /dev/null
+ readlink /proc/1/exe 2> /dev/null
+@@ -32,7 +36,7 @@
+ }
+
+ # ensure path exists
+-function make_path()
++make_path()
+ {
+ local path="$1"
+ [ -d "$path" ] || mkdir -p "$path" || fail "Could not create $path"
+@@ -40,34 +44,37 @@
+
+ # real and effective user id should be the same - or the wine-profile could become useless
+ # TODO: gracefully solve the issue by using su to run wine
+-function validateUser()
++validateUser()
+ {
+ local userid=$(id -un)
+
+ if [ "$userid" != "$USER" ] ; then
+- echo -e "\n\n *** TeamViewer can not be executed with sudo! ***\n Either use your normal user account without sudo\n or use a the real root account to log in to your desktop (not recommended!)."
+-
++ echo
++ echo "*** TeamViewer can not be executed with sudo! ***"
++ echo "Either use your normal user account without sudo"
++ echo "or use a the real root account to log in to your desktop (not recommended!)."
++
+ return 1
+ fi
+ }
+
+-function isSuperUser # root or sudo
++isSuperUser() # root or sudo
+ {
+ local userid=$(id -u)
+- [ "$userid" == 0 ]
++ [ "$userid" = 0 ]
+ }
+
+-function rootSuggest()
++rootSuggest()
+ {
+- isSuperUser || echo -e "\nTry with root / sudo ?"
++ isSuperUser || { echo ; echo "Try with root / sudo ?" ;}
+ false
+ }
+
+-function updateMenuEntries()
++updateMenuEntries()
+ {
+ local action="$1" # install / uninstall
+ xdg-desktop-menu $action --mode system "$TV_DESKTOP_FILE" # prefer installed xdg script (tvw_config)
+
+ cmdExists update-menus && update-menus
+ cmdExists update-icon-caches && update-icon-caches /usr/share/icons/hicolor
+-}
+\ No newline at end of file
++}
+--- teamviewer8/tv_bin/script/tvw_config
++++ teamviewer8/tv_bin/script/tvw_config
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ TV_VERSION="8.0.17147"
+ TV_PKGTYPE="DEB"
+--- teamviewer8/tv_bin/script/tvw_main
++++ teamviewer8/tv_bin/script/tvw_main
+@@ -1,11 +1,11 @@
+-#!/bin/bash
++#!/bin/sh
+
+-source "$TV_SCRIPT_DIR/tvw_config"
+-source "$TV_SCRIPT_DIR/tvw_aux"
+-source "$TV_SCRIPT_DIR/tvw_daemon"
+-source "$TV_SCRIPT_DIR/tvw_profile"
++. "$TV_SCRIPT_DIR/tvw_config"
++. "$TV_SCRIPT_DIR/tvw_aux"
++. "$TV_SCRIPT_DIR/tvw_daemon"
++. "$TV_SCRIPT_DIR/tvw_profile"
+
+-function Init()
++Init()
+ {
+ local startLog="$TV_LOG_DIR/startup.log"
+
+@@ -17,7 +17,7 @@
+ InitProfile >> "$startLog" || die "InitProfile failed. Please check '$startLog'"
+ }
+
+-function LogStartupInfo()
++LogStartupInfo()
+ {
+ exec 2>&1 # redirect stderr
+
+@@ -45,7 +45,7 @@
+ }
+
+
+-function Main()
++Main()
+ {
+ local param="$1"
+ local opt="$2"
+@@ -72,7 +72,7 @@
+ echo
+ }
+
+-function Run_TeamViewer
++Run_TeamViewer()
+ {
+ Init
+ echo "Launching TeamViewer..."
+@@ -82,7 +82,7 @@
+ exec wine "c:\TeamViewer\TeamViewer.exe" "$@"
+ }
+
+-function Run_TeamViewer_Desktop
++Run_TeamViewer_Desktop()
+ {
+ [ "$1" = "--desktop" ] && shift
+
+@@ -94,7 +94,7 @@
+ exec wine "c:\TeamViewer\TeamViewer_Desktop.exe" "$@"
+ }
+
+-function Run_KillTeamViewer
++Run_KillTeamViewer()
+ {
+ local this="$0" # ps: allow user names with more than 8 characters...
+ local userlist=$(ps -e -o "user:25,command" | grep -v "^root" | grep TeamViewer | cut --delimiter=' ' -f 1)
+@@ -111,19 +111,19 @@
+ fi
+ }
+
+-function Run_WineCfg
++Run_WineCfg()
+ {
+ Init
+ wine winecfg "$@"
+ }
+
+-function Run_RegEdit
++Run_RegEdit()
+ {
+ Init
+ wine regedit "$@"
+ }
+
+-function Run_Daemon()
++Run_Daemon()
+ {
+ local opt="$1"
+
+@@ -136,7 +136,7 @@
+ esac
+ }
+
+-function SetPasswd()
++SetPasswd()
+ {
+ local pwd="$1"
+ [ -n "$pwd" ] || die 'no password specified'
+@@ -156,7 +156,7 @@
+ echo
+ }
+
+-function ExportLicense()
++ExportLicense()
+ {
+ local license="$1"
+ local path='/tmp/tv_global.conf'
+@@ -176,7 +176,7 @@
+ echo
+ }
+
+-function CreateZipLog()
++CreateZipLog()
+ {
+ local cfg_dir="config"
+ local log_dir="logfiles"
+@@ -202,7 +202,7 @@
+ echo 'done'
+ }
+
+-function PrintHelp()
++PrintHelp()
+ {
+ PrintVersion
+ echo
+@@ -222,7 +222,7 @@
+ ABecho "teamviewer --daemon enable" "enable TeamViewer daemon - start daemon on system startup (default)"
+ }
+
+-function PrintInfo()
++PrintInfo()
+ {
+ PrintVersion
+ echo
+@@ -231,12 +231,12 @@
+ PrintTeamViewerID
+ }
+
+-function PrintVersion()
++PrintVersion()
+ {
+ ABecho "TeamViewer" "$TV_VERSION"
+ }
+
+-function PrintDaemonStatus()
++PrintDaemonStatus()
+ {
+ local cmd="$(daemonCtl 'status')"
+ local txt="$(eval "$cmd")"
+@@ -245,7 +245,7 @@
+ ABecho "teamviewerd status" "$txt"
+ }
+
+-function PrintTeamViewerID
++PrintTeamViewerID()
+ {
+ local config="$TV_BASE_DIR/config/global.conf"
+ local tvid
+@@ -258,4 +258,4 @@
+ echo "TeamViewer ID: not found"
+ echo "Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)"
+ fi
+-}
+\ No newline at end of file
++}
+--- teamviewer8/tv_bin/script/tvw_profile
++++ teamviewer8/tv_bin/script/tvw_profile
+@@ -1,6 +1,6 @@
+-#!/bin/bash
++#!/bin/sh
+
+-function InitProfile()
++InitProfile()
+ {
+ exec 2>&1 # redirect stderr
+
+@@ -12,7 +12,7 @@
+ echo "ok"
+ }
+
+-function SetupWine()
++SetupWine()
+ {
+ # setup dosdevices and symlinks
+ local c_sym="$WINEPREFIX/dosdevices/c:"
+@@ -32,7 +32,7 @@
+
+
+ # setup/validate drive symlinks
+-function setup_drive_symlink()
++setup_drive_symlink()
+ {
+ local sym="$1"
+ local dst="$2"
+@@ -44,7 +44,7 @@
+ }
+
+ # setup logfile symlinks
+-function setup_log_symlink
++setup_log_symlink()
+ {
+ local cuser=$(id -un)
+ local basepath="$WINEPREFIX/drive_c/users/$cuser"
+@@ -66,7 +66,7 @@
+ }
+
+ # TODO simplify by using a different Log dir
+-function setup_prog_dir()
++setup_prog_dir()
+ {
+ local progdir="$WINEPREFIX/drive_c/TeamViewer"
+ local progsrc="$TV_WINE_DIR/drive_c/TeamViewer"
+@@ -83,7 +83,7 @@
+ done
+ }
+
+-function setup_winemenubuilder()
++setup_winemenubuilder()
+ {
+ local sysdir="$WINEPREFIX/drive_c/windows/system32"
+ local syssrc="$TV_WINE_DIR/drive_c/windows/system32"
+@@ -93,7 +93,7 @@
+ [ -e "$sysdir/winemenubuilder.exe" ] || die "Could not copy winemenubuilder"
+ }
+
+-function SetupWineTweaks()
++SetupWineTweaks()
+ {
+ [ "$USE_LOCAL_WINE" = "yes" ] && return
+ [ -d "$WINEPREFIX/.tweak" ] || mkdir "$WINEPREFIX/.tweak"
+@@ -105,7 +105,7 @@
+ # winetweak setwinver # Set Win2k mode for TeamViewer
+ }
+
+-function winetweak()
++winetweak()
+ {
+ local tweak="$1"
+ local tweakmark="$WINEPREFIX/.tweak/$tweak"
+@@ -118,7 +118,7 @@
+
+ }
+
+-function SetupTarEnv()
++SetupTarEnv()
+ {
+ echo " - "
+ # TODO for tar - if [ "$TV_PKGTYPE" = "TAR" ] ; then
+@@ -139,7 +139,7 @@
+ # fi
+ }
+
+-function SetupEnv()
++SetupEnv()
+ {
+ echo " - "
+ # TODO remove
+@@ -159,4 +159,4 @@
+ uname -m > "$WINEPREFIX/drive_c/distarch"
+ (cd /etc; ls -m *-release *-version *_version > "$WINEPREFIX/drive_c/distrelease" 2> /dev/null)
+ true
+-}
+\ No newline at end of file
++}
diff --git a/net-misc/teamviewer/files/teamviewer-8.0.17147-gentoo.patch b/net-misc/teamviewer/files/teamviewer-8.0.17147-gentoo.patch
new file mode 100644
index 000000000000..b3fe411c359a
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewer-8.0.17147-gentoo.patch
@@ -0,0 +1,135 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue Feb 19 23:01:44 UTC 2013
+Subject: remove all daemon/systemd related bits
+
+--- teamviewer8/tv_bin/script/tvw_main
++++ teamviewer8/tv_bin/script/tvw_main
+@@ -2,7 +2,6 @@
+
+ . "$TV_SCRIPT_DIR/tvw_config"
+ . "$TV_SCRIPT_DIR/tvw_aux"
+-. "$TV_SCRIPT_DIR/tvw_daemon"
+ . "$TV_SCRIPT_DIR/tvw_profile"
+
+ Init()
+@@ -57,7 +56,6 @@
+ --help ) PrintHelp ;;
+ --version ) PrintVersion ;;
+ --info ) PrintInfo ;;
+- --daemon ) Run_Daemon $opt ;;
+ --winecfg ) Run_WineCfg "$@" ;;
+ --regedit ) Run_RegEdit "$@" ;;
+ --kill ) Run_KillTeamViewer ;;
+@@ -123,26 +121,14 @@
+ wine regedit "$@"
+ }
+
+-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
+-}
+-
+ 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' ;;
+@@ -151,29 +137,28 @@
+ 13 ) echo 'password not accepted - illegal char detected' ;;
+ * ) echo 'unknown response' ;;
+ esac
+-
+- Run_Daemon 'start' || die 'failed to restart the daemon'
+- echo
++
++ echo "You may start your teamviewer daemon again."
+ }
+
+ 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'" ;;
+ 11 ) echo "destination '$path' not accessible" ;;
+ * ) echo 'unknown response' ;;
+ esac
+-
+- Run_Daemon 'start' || die 'failed to restart the daemon'
+- echo
++
++ echo "You may start your teamviewer daemon again."
+ }
+
+ CreateZipLog()
+@@ -214,35 +199,18 @@
+ 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)"
+ }
+
+ PrintInfo()
+ {
+ PrintVersion
+ echo
+- PrintDaemonStatus
+- echo
+ PrintTeamViewerID
+ }
+
+ PrintVersion()
+ {
+ ABecho "TeamViewer" "$TV_VERSION"
+-}
+-
+-PrintDaemonStatus()
+-{
+- local cmd="$(daemonCtl 'status')"
+- local txt="$(eval "$cmd")"
+- [ $? = 0 ] || txt='n/a (error)'
+-
+- ABecho "teamviewerd status" "$txt"
+ }
+
+ PrintTeamViewerID
+@@ -256,6 +224,6 @@
+ ABecho "TeamViewer ID:" "$tvid"
+ else
+ echo "TeamViewer ID: not found"
+- echo "Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)"
+- fi
+-}
++ echo "Try restarting the TeamViewer daemon."
++ fi
++}
diff --git a/net-misc/teamviewer/files/teamviewerd.init b/net-misc/teamviewer/files/teamviewerd.init
new file mode 100644
index 000000000000..86553666f183
--- /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.1 2013/02/20 02:39:15 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/metadata.xml b/net-misc/teamviewer/metadata.xml
new file mode 100644
index 000000000000..a824f0d989f8
--- /dev/null
+++ b/net-misc/teamviewer/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <name>Diego Elio Pettenò</name>
+ </maintainer>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+ <use>
+ <flag name="system-wine">Use <pkg>app-emulation/wine</pkg> instead of bundled one.</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-misc/teamviewer/teamviewer-7.0.9377.ebuild b/net-misc/teamviewer/teamviewer-7.0.9377.ebuild
new file mode 100644
index 000000000000..1929d74372f2
--- /dev/null
+++ b/net-misc/teamviewer/teamviewer-7.0.9377.ebuild
@@ -0,0 +1,111 @@
+# 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-7.0.9377.ebuild,v 1.1 2013/02/20 02:39:15 hasufell Exp $
+
+EAPI=5
+
+inherit eutils gnome2-utils
+
+# 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="https://www.teamviewer.com/download/version_${MV}x/teamviewer_linux.tar.gz -> ${P}.tar.gz"
+
+LICENSE="TeamViewer !system-wine? ( LGPL-2.1 )"
+SLOT=${MV}
+KEYWORDS="~amd64 ~x86"
+IUSE="system-wine"
+
+RESTRICT="mirror"
+
+RDEPEND="
+ x11-misc/xdg-utils
+ !system-wine? (
+ amd64? (
+ app-emulation/emul-linux-x86-baselibs
+ app-emulation/emul-linux-x86-soundlibs
+ 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}/teamviewer${MV}
+
+make_winewrapper() {
+ cat << EOF > "${T}/${MY_PN}"
+#!/bin/sh
+exec wine "/opt/${MY_PN}/bin/TeamViewer.exe" "\$@"
+EOF
+ chmod go+rx "${T}/${MY_PN}"
+ exeinto /opt/bin
+ doexe "${T}/${MY_PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-POSIX.patch
+}
+
+src_install () {
+ if use system-wine ; then
+ make_winewrapper
+ exeinto /opt/${MY_PN}/bin
+ doexe "${S}/.wine/drive_c/Program Files/TeamViewer/Version7/"*
+ else
+ # install scripts and .reg
+ insinto /opt/${MY_PN}/bin
+ find ".tvscript" -type f \( \! -name "${PN}.desktop*" -a \! -name "${PN}.png" \) \
+ -maxdepth 1 -execdir doins '{}' \;
+
+ # install wine
+ insinto /opt/${MY_PN}/wine
+ doins -r "${S}"/.wine/*
+ dosym /opt/${MY_PN}/bin/${PN} /opt/bin/${MY_PN}
+
+ # fix permissions
+ fperms 755 /opt/${MY_PN}/bin/{${PN},wrapper,killteamviewer}
+ fperms 755 /opt/${MY_PN}/wine/bin/wine{,-preloader,server}
+ fperms 755 "/opt/${MY_PN}/wine/drive_c/Program Files/TeamViewer/Version${MV}"/TeamViewer{,_Desktop}.exe
+ find "${D}"/opt/${MY_PN} -type f -name "*.so*" -execdir chmod 755 '{}' \;
+ fi
+
+ newicon -s 48 "${S}"/.tvscript/${PN}.png ${MY_PN}.png
+ dodoc 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
+
+ elog "Logs are written to:"
+ elog " ~/.teamviewer/7"
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/teamviewer/teamviewer-8.0.17147.ebuild b/net-misc/teamviewer/teamviewer-8.0.17147.ebuild
new file mode 100644
index 000000000000..2aed6fe91a2a
--- /dev/null
+++ b/net-misc/teamviewer/teamviewer-8.0.17147.ebuild
@@ -0,0 +1,132 @@
+# 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.17147.ebuild,v 1.1 2013/02/20 02:39:15 hasufell Exp $
+
+EAPI=5
+
+inherit eutils gnome2-utils
+
+# 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="
+ x11-misc/xdg-utils
+ !system-wine? (
+ amd64? (
+ app-emulation/emul-linux-x86-baselibs
+ app-emulation/emul-linux-x86-soundlibs
+ 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_unpack() {
+ default
+ unpack ./data.tar.gz
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-POSIX.patch \
+ "${FILESDIR}"/${P}-gentoo.patch
+
+ sed \
+ -e "s/@TVV@/${MV}/g" \
+ "${FILESDIR}"/${PN}d.init > "${T}"/${PN}d-${MV} || 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,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{,_Desktop}.exe
+ find "${D}"/opt/${MY_PN} -type f -name "*.so*" -execdir chmod 755 '{}' \;
+ fi
+
+ # install daemon binary
+ exeinto /opt/${MY_PN}
+ doexe ${PN}d
+
+ doinitd "${T}"/${PN}d-${MV}
+
+ newicon -s 48 desktop/${PN}.png ${MY_PN}.png
+ dodoc ../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
+
+ ewarn "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 \"~/.config/teamviewer8/logfiles\""
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}