get-scripts annotate teamviewer @ rev 34

Add sublime-text-3
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 23 08:59:52 2015 +0100 (2015-03-23)
parents 0aac769ef758
children 138433e8cb19
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@33 7 WGET_URL=$(wget -O - $WGET_URL | sed '/i386/!d;s/.*"\([^"]*i386[^"]*\).*/\1/')
pascal@33 8 TARBALL="$(basename $WGET_URL)"
pascal@19 9 wget -O $TARBALL $WGET_URL
pascal@19 10
pascal@19 11 [ -f $TARBALL ] || abort_package "Could not download $TARBALL. Exiting."
pascal@19 12
pascal@19 13 mkdir $PACKAGE
pascal@19 14 dpkg-deb -e $TARBALL $PACKAGE/meta
pascal@19 15 dpkg-deb -x $TARBALL $PACKAGE/fs
pascal@19 16
pascal@19 17 # extracted pkg can be removed: Save RAM
pascal@19 18 rm -f $TARBALL
pascal@19 19
pascal@19 20 sed '/^Description:/,$!d;s/^Description://' \
pascal@19 21 < $PACKAGE/meta/control > $PACKAGE/description.txt
pascal@19 22
pascal@19 23 SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@19 24 MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@19 25 VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@19 26 mv $PACKAGE $PACKAGE-$VERSION
pascal@19 27
pascal@19 28 cd $PACKAGE-$VERSION/fs
pascal@33 29 [ -e usr/bin/$PACKAGE ] ||
pascal@33 30 ln -s $(cd usr/bin ; ls $PACKAGE* 2> /dev/null) \
pascal@33 31 usr/bin/$PACKAGE 2> /dev/null || true
pascal@19 32 mkdir -p usr/share/applications
pascal@19 33 sed "s|EXEC|/usr/bin/$PACKAGE|g;s!ICON!/$(find opt | grep $PACKAGE.png)!g" \
pascal@19 34 < $(find opt | grep -E '(desktop.template|\.desktop$)') \
pascal@19 35 > usr/share/applications/$PACKAGE.desktop
pascal@33 36 sed -i 's/readlink -e/readlink $0 || echo /' \
pascal@33 37 $(find opt -type f | grep /$PACKAGE$)
pascal@19 38 mkdir -p etc/init.d
pascal@19 39 ln -s /$(find opt | grep /teamviewerd$) etc/init.d/teamviewerd
pascal@19 40 cd ../..
pascal@19 41
pascal@19 42 # Web viewer (needs flash): https://go.teamviewer.com/v${VERSION%%.*}/
pascal@19 43
pascal@19 44 cd $TMP_DIR
pascal@19 45 set +e