Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Teamviewer 8 ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1155
Location: Austria

PostPosted: Mon Jan 21, 2013 7:41 am    Post subject: [solved] Teamviewer 8 ebuild Reply with quote

The new Teamviewer 8 causes some headache to me, as it's sadly not distributed as tarball anymore. Is there a nice way to extract files from the deb or rpm package via Ebuild to work around that issue?
_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...


Last edited by ToeiRei on Mon Jan 21, 2013 11:59 am; edited 1 time in total
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Mon Jan 21, 2013 10:09 am    Post subject: Reply with quote

Both of those are possible but deb might be easiest to work with:

Dev Manual wrote:
we dont have to 'handle' these because all debian packages have a source tarball ... the .deb format is pretty simple though, it's managed by the 'ar' utility from binutils. you can unpack a .deb by simply doing ar x blah.deb ... this will give you three files: debian-binary: plain text file which just contains version number of the .deb format control.tar.gz: a few files which control installing/verifying of package data.tar.gz: all the compiled files ... you could just extract it to /


If you're working with rpms you want to use the rpm eclass: RPM Sources.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1155
Location: Austria

PostPosted: Mon Jan 21, 2013 10:56 am    Post subject: Reply with quote

so teamviewer-8.0.16675.ebuild could look like this?

Code:
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit eutils

DESCRIPTION="the All-In-One Solution for Remote Access and Support over the Internet"
HOMEPAGE="http://www.teamviewer.com"


SRC_URI="
        x86?    ( http://www.teamviewer.com/download/version_8x/teamviewer_linux.deb )
        amd64?  ( http://www.teamviewer.com/download/version_8x/teamviewer_linux_x64.deb )
"

LICENSE="TeamViewer"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RESTRICT="mirror strip"

RDEPEND="
        app-emulation/wine
"


src_unpack() {
        unpack ${A}
        unpack ./data.tar.gz
        rm -f control.tar.gz data.tar.gz debian-binary
}


pkg_setup() {
        elog "This ebuild installs the TeamViewer binary and libraries and relies on"
        elog "Gentoo's wine package to run the actual program."
        elog
        elog "If you encounter any problems, consider running TeamViewer with the"
        elog "bundled wine package manually."
}

src_install() {
        insinto /opt/teamviewer/ || die
        doins opt/teamviewer8/tv_bin/wine/drive_c/TeamViewer/* ||
                die
        echo "#!/bin/bash" > teamviewer || die
        echo "/usr/bin/wine /opt/teamviewer/TeamViewer.exe" >> teamviewer || die
        insinto /usr/bin || die
        dobin teamviewer || die

        dodoc opt/teamviewer8/linux_FAQ_{EN,DE}.txt || die

        make_desktop_entry ${PN} TeamViewer ${PN}
}

_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1155
Location: Austria

PostPosted: Mon Jan 21, 2013 11:15 am    Post subject: Reply with quote

Ok - ebuild works; But not the program itself;

TeamViewer 8 complains about a missing file named tvwine.dll.so - which is installed including dependencies.

Code:
# ldd tvwine.dll.so
        linux-gate.so.1 (0xf77a1000)
        libX11.so.6 => /usr/lib32/libX11.so.6 (0xf766c000)
        libXtst.so.6 => /usr/lib32/libXtst.so.6 (0xf7666000)
        libXext.so.6 => /usr/lib32/libXext.so.6 (0xf7657000)
        libXdamage.so.1 => /usr/lib32/libXdamage.so.1 (0xf7653000)
        libXfixes.so.3 => /usr/lib32/libXfixes.so.3 (0xf764c000)
        libwine.so.1 => /usr/lib32/libwine.so.1 (0xf7508000)
        libc.so.6 => /lib32/libc.so.6 (0xf7362000)
        libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf7347000)
        libdl.so.2 => /lib32/libdl.so.2 (0xf7342000)
        libXi.so.6 => /usr/lib32/libXi.so.6 (0xf7332000)
        /lib/ld-linux.so.2 (0x4e70a000)
        libXau.so.6 => /usr/lib32/libXau.so.6 (0xf732e000)
        libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf7328000)


Any ideas?

Edit: Yes, I do ;)

teamviewer needs WINEDLLPATH set as it uses its own junk.

Launcher:

Code:

#!/bin/bash
export WINEDLLPATH=/opt/teamviewer
/usr/bin/wine /opt/teamviewer/TeamViewer.exe

_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1155
Location: Austria

PostPosted: Mon Jan 21, 2013 11:55 am    Post subject: Reply with quote

Working ebuild here:

Code:
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit eutils

DESCRIPTION="the All-In-One Solution for Remote Access and Support over the Internet"
HOMEPAGE="http://www.teamviewer.com"


SRC_URI="
        x86?    ( http://www.teamviewer.com/download/version_8x/teamviewer_linux.deb )
        amd64?  ( http://www.teamviewer.com/download/version_8x/teamviewer_linux_x64.deb )
"

LICENSE="TeamViewer"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RESTRICT="mirror strip"

RDEPEND="
        app-emulation/wine
"


src_unpack() {
        unpack ${A}
        unpack ./data.tar.gz
        rm -f control.tar.gz data.tar.gz debian-binary
}


pkg_setup() {
        elog "This ebuild installs the TeamViewer binary and libraries and relies on"
        elog "Gentoo's wine package to run the actual program."
        elog
        elog "If you encounter any problems, consider running TeamViewer with the"
        elog "bundled wine package manually."
}

src_install() {
        insinto /opt/teamviewer/
        doins opt/teamviewer8/tv_bin/wine/drive_c/TeamViewer/*

        insinto /usr/sbin
        doins opt/teamviewer8/tv_bin/teamviewerd
        fperms +x /usr/sbin/teamviewerd

        echo "#!/bin/bash" > teamviewer || die
        echo "export WINEDLLPATH=/opt/teamviewer" >> teamviewer || die
        echo "/usr/bin/wine /opt/teamviewer/TeamViewer.exe" >> teamviewer || die
        insinto /usr/bin
        dobin teamviewer

        dodoc opt/teamviewer8/linux_FAQ_{EN,DE}.txt  || die
        dodoc opt/teamviewer8/CopyRights_{EN,DE}.txt || die

        make_desktop_entry ${PN} TeamViewer ${PN}

        newinitd "${FILESDIR}/teamviewerd.rc" teamviewer
}

pkg_postinst() {
        einfo "In order to properly work, ${PN} now needs a background dameon to be running."
        einfo "An rc script has been installed at /etc/init.d/${PN}"
}


and the rc script for /etc/init.d/teamviewerd (placed in $FILESDIR as teamviewerd.rc):

Code:

#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

start() {
        ebegin "Starting teamviewer"
        start-stop-daemon --start --exec /usr/sbin/teamviewerd --pidfile /var/run/teamviewerd.pid
        eend $?
}

stop() {
        ebegin "Stopping teamviewer"
        start-stop-daemon --stop --exec /usr/sbin/teamviewerd --pidfile /var/run/teamviewerd.pid
        eend $?
}

_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
Flameeyes
Developer
Developer


Joined: 30 Mar 2005
Posts: 187
Location: Dublin, Ireland

PostPosted: Wed Jan 23, 2013 2:01 pm    Post subject: Reply with quote

I've been pointed to here – through https://bugs.gentoo.org/show_bug.cgi?id=360499 – over on twitter...

While I don't have a license for TeamViewer 8 that I could use, I wouldn't mind helping with getting this into Portage (I do have a license for TV7, so in case I might actually keep the two slotted). There are a few rough points I could help polishing on the ebuild and init script but it looks vastly ok.

ToeiRei would you mind proxy-maintaining this with me?
_________________
You want to know what I'm working on right now? Just follow my blog.

Flattr me!
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1155
Location: Austria

PostPosted: Mon Jan 28, 2013 2:49 pm    Post subject: Reply with quote

Hi guys - quick update as I had a chat with the teamviewer support guys:

Teamviewer 8 for Linux is BETA - that's why the tarball isn't provided yet. They should be available later.
_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
Wuodan
n00b
n00b


Joined: 21 May 2012
Posts: 23

PostPosted: Thu Feb 14, 2013 11:22 am    Post subject: Reply with quote

@ToeiRei
You're hero(ine) - if only this would have been in an overlay and findable by http://gpo.zugaina.org/.
Found this thread when I was almost done - my version is in the wuodan overlay.
Thanks a lot, I really needed this!
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1155
Location: Austria

PostPosted: Mon Feb 18, 2013 3:35 pm    Post subject: Reply with quote

new version is out there.
too bad teamviewer guys don't have different names for their versions...
_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum