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