wok view get-xlite/stuff/get-xlite @ rev 4392
hal: update depends
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Thu Oct 15 21:05:53 2009 +0000 (2009-10-15) |
parents | a44a4456c6f2 |
children | 007b91d3da0b |
line source
1 #!/bin/sh -e
3 ROOT="$1"
5 if test $(id -u) != 0 ; then
6 echo -e "\nYou must be root to run `basename $0`."
7 echo -e "Please type 'su' and root password to become super-user.\n"
8 exit 0
9 fi
11 if [ -d $ROOT/var/lib/tazpkg/installed/xlite ]; then
12 [ -n "$ROOT" ] && exit 1
13 tazpkg remove xlite
14 [ -d /var/lib/tazpkg/installed/xlite ] && exit 1
15 fi
17 WEB_SITE="http://www.counterpath.net/"
18 URL="http://counterpath.s3.amazonaws.com/downloads/X-Lite_Install.tar.gz"
20 TMP_DIR=/tmp/get-xlite-$$-$RANDOM
21 CUR_DIR=$(pwd)
22 mkdir -p $TMP_DIR && cd $TMP_DIR
24 # Download tarball
25 wget $URL
26 TARBALL="$(basename $URL)"
27 if [ ! -f $TARBALL ]; then
28 cd $CUR_DIR
29 rm -rf $TMP_DIR
30 echo "Could not download $TARBALL. Exiting."
31 exit 1
32 fi
34 # Extract
35 tar xzf $(basename $URL)
37 VERSION="$(strings xten-xlite/xtensoftphone | grep ^Version | sed 's/.*="\(.*\)"/\1/')"
39 # Install files
40 dir=xlite-$VERSION/fs
41 mkdir -p $dir/usr/bin $dir/usr/share/applications
42 mv xten-xlite/xtensoftphone $dir/usr/bin
43 ln -s xtensoftphone $dir/usr/bin/xlite
44 cat > $dir/usr/share/applications/xlite.desktop <<EOT
45 [Desktop Entry]
46 Encoding=UTF-8
47 Name=Softphone Xlite
48 Comment=SIP softphone (VoIP)
49 Exec=xtensoftphone
50 Icon=firefox.png
51 Type=Application
52 Categories=Application;Network;
53 EOT
55 # Create pseudo package
56 cat > xlite-$VERSION/receipt <<EOT
57 PACKAGE="xlite"
58 VERSION="$VERSION"
59 CATEGORY="non-free"
60 SHORT_DESC="SIP soft phone."
61 WEB_SITE="$WEB_SITE"
62 DEPENDS="atk cairo expat fontconfig freetype glib gtk+ libglade libpng libxml2 \
63 pango pixman xorg-libX11 xorg-libXau xorg-libXcomposite xorg-libXcursor \
64 xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes xorg-libXft \
65 xorg-libXinerama xorg-libXrandr xorg-libXrender zlib libstdc++5"
66 EOT
68 # Pack
69 tazpkg pack xlite-$VERSION
71 # Install pseudo package
72 tazpkg install xlite-$VERSION.tazpkg --root=$ROOT
74 # Clean
75 cd $CUR_DIR
76 rm -rf $TMP_DIR