wok view get-xlite/stuff/get-xlite @ rev 2510

qemu: update depends
author Julien Rabier <taziden@slitaz.org>
date Mon Mar 16 16:44:07 2009 +0100 (2009-03-16)
parents 5b73f8aba06a
children 32959e7975fc
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"
19 URLLIB="http://http.us.debian.org/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-18_i386.deb"
21 TMP_DIR=/tmp/get-xlite-$$-$RANDOM
22 CUR_DIR=$(pwd)
23 mkdir -p $TMP_DIR && cd $TMP_DIR
25 # Download tarball
26 wget $URL
27 wget $URLLIB
29 # Extract
30 tar xzf $(basename $URL)
32 VERSION="$(strings xten-xlite/xtensoftphone | grep ^Version | sed 's/.*="\(.*\)"/\1/')"
34 # Install files
35 dir=xlite-$VERSION/fs
36 mkdir -p $dir/usr/bin $dir/usr/share/applications
37 mv xten-xlite/xtensoftphone $dir/usr/bin
38 ln -s xtensoftphone $dir/usr/bin/xlite
39 cat > $dir/usr/share/applications/xlite.desktop <<EOT
40 [Desktop Entry]
41 Encoding=UTF-8
42 Name=Softphone Xlite
43 Comment=SIP softphone (VoIP)
44 Exec=xtensoftphone
45 Icon=firefox.png
46 Type=Application
47 Categories=Application;Network;
48 EOT
49 dpkg-deb -x $(basename $URLLIB) $dir
50 rm -rf $dir/usr/share/doc
52 # Create pseudo package
53 cat > xlite-$VERSION/receipt <<EOT
54 PACKAGE="xlite"
55 VERSION="$VERSION"
56 CATEGORY="non-free"
57 SHORT_DESC="SIP soft phone."
58 WEB_SITE="$WEB_SITE"
59 DEPENDS="atk cairo expat fontconfig freetype glib gtk+ libglade libpng libxml2 \
60 pango pixman xorg-libX11 xorg-libXau xorg-libXcomposite xorg-libXcursor \
61 xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes xorg-libXft \
62 xorg-libXinerama xorg-libXrandr xorg-libXrender zlib"
63 EOT
65 # Pack
66 tazpkg pack xlite-$VERSION
68 # Install pseudo package
69 tazpkg install xlite-$VERSION.tazpkg --root=$ROOT
71 # Clean
72 cd $CUR_DIR
73 rm -rf $TMP_DIR