get-scripts annotate teamviewer @ rev 63

Add nanozip
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 10 14:15:08 2016 +0200 (2016-08-10)
parents 2cdf3e534506
children a5139b147553
rev   line source
pascal@34 1 SHORT_DESC="Remote Control Application"
pascal@34 2 WEB_SITE="http://www.teamviewer.com/"
pascal@34 3 # end of get.list data
pascal@33 4 WGET_URL=${WEB_SITE}en/download/linux.aspx
pascal@19 5 DEPENDS="bash ncurses alsa-lib zlib xorg-libXext"
pascal@19 6
pascal@35 7 WGET_URL=$(wget --no-check-certificate -O - $WGET_URL | \
pascal@35 8 sed '/i386/!d;s/.*"\([^"]*i386[^"]*\).*/\1/')
pascal@33 9 TARBALL="$(basename $WGET_URL)"
pascal@35 10 wget --no-check-certificate -O $TARBALL $WGET_URL
pascal@19 11
pascal@63 12 [ -f $TARBALL ] || abort_package
pascal@19 13
pascal@19 14 mkdir $PACKAGE
pascal@19 15 dpkg-deb -e $TARBALL $PACKAGE/meta
pascal@19 16 dpkg-deb -x $TARBALL $PACKAGE/fs
pascal@19 17
pascal@19 18 # extracted pkg can be removed: Save RAM
pascal@19 19 rm -f $TARBALL
pascal@19 20
pascal@19 21 sed '/^Description:/,$!d;s/^Description://' \
pascal@19 22 < $PACKAGE/meta/control > $PACKAGE/description.txt
pascal@19 23
pascal@19 24 SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@19 25 MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@19 26 VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@19 27 mv $PACKAGE $PACKAGE-$VERSION
pascal@19 28
pascal@19 29 cd $PACKAGE-$VERSION/fs
pascal@33 30 [ -e usr/bin/$PACKAGE ] ||
pascal@33 31 ln -s $(cd usr/bin ; ls $PACKAGE* 2> /dev/null) \
pascal@33 32 usr/bin/$PACKAGE 2> /dev/null || true
pascal@19 33 mkdir -p usr/share/applications
pascal@19 34 sed "s|EXEC|/usr/bin/$PACKAGE|g;s!ICON!/$(find opt | grep $PACKAGE.png)!g" \
pascal@19 35 < $(find opt | grep -E '(desktop.template|\.desktop$)') \
pascal@19 36 > usr/share/applications/$PACKAGE.desktop
pascal@33 37 sed -i 's/readlink -e/readlink $0 || echo /' \
pascal@33 38 $(find opt -type f | grep /$PACKAGE$)
pascal@19 39 mkdir -p etc/init.d
pascal@19 40 ln -s /$(find opt | grep /teamviewerd$) etc/init.d/teamviewerd
pascal@19 41
pascal@19 42 # Web viewer (needs flash): https://go.teamviewer.com/v${VERSION%%.*}/