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