get-scripts annotate teamviewer @ rev 19

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