wok view get-xlite/stuff/get-xlite @ rev 14171
libnfc: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 08 15:35:51 2013 +0100 (2013-03-08) |
parents | 28f06a85ec86 |
children |
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/"
19 TMP_DIR=/tmp/get-xlite-$$-$RANDOM
20 CUR_DIR=$(pwd)
21 mkdir -p $TMP_DIR && cd $TMP_DIR
23 # Download tarball
24 while read URL; do
25 wget $URL || continue
26 TARBALL="$(basename $URL)"
27 [ -s $TARBALL ] && break
28 done <<EOT
29 http://counterpath.s3.amazonaws.com/downloads/X-Lite_Install.tar.gz
30 ftp://ftp.uni-frankfurt.de/pub/Mirrors2/gentoo.org/distfiles/X-Lite_Install.tar.gz
31 ftp://ftp.secyt.gov.ar/pub/software/X-Lite_Install.tar.gz
32 ftp://ftp.prz.rzeszow.pl/pub/gentoo/source/distfiles/X-Lite_Install.tar.gz
33 ftp://ftp.nz.debian.org/gentoo/distfiles/X-Lite_Install.tar.gz
34 ftp://ftp.port80.se/gentoo/distfiles/X-Lite_Install.tar.gz
35 ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/distfiles/X-Lite_Install.tar.gz
36 ftp://ftp.wh8.tu-dresden.de/pub/linux/distributions/gentoo/distfiles/X-Lite_Install.tar.gz
37 ftp://ftp.swin.edu.au/gentoo/distfiles/X-Lite_Install.tar.gz
38 ftp://ftp.mgts.by/pub/gentoo/distfiles/X-Lite_Install.tar.gz
39 ftp://ftp.uni-kassel.de/Mirrors/ftp.fhh.opensource-mirror.de/gentoo/distfiles/X-Lite_Install.tar.gz
40 ftp://ftp.cs.mun.ca/pub/mirror/gentoo/distfiles/X-Lite_Install.tar.gz
41 ftp://ftp.free.fr/.mirrors1/ftp.gentoo.org/distfiles/X-Lite_Install.tar.gz
42 ftp://ftp.fi.debian.org/pub/gentoo/distfiles/X-Lite_Install.tar.gz
43 EOT
44 if [ ! -f $TARBALL ]; then
45 cd $CUR_DIR
46 rm -rf $TMP_DIR
47 echo "Could not download $TARBALL. Exiting."
48 exit 1
49 fi
51 # Extract
52 tar xzf $(basename $URL)
54 VERSION="$(strings xten-xlite/xtensoftphone | grep ^Version | sed 's/.*="\(.*\)"/\1/')"
56 # Install files
57 dir=xlite-$VERSION/fs
58 mkdir -p $dir/usr/bin $dir/usr/share/applications
59 mv xten-xlite/xtensoftphone $dir/usr/bin
60 ln -s xtensoftphone $dir/usr/bin/xlite
61 cat > $dir/usr/share/applications/xlite.desktop <<EOT
62 [Desktop Entry]
63 Encoding=UTF-8
64 Name=Softphone Xlite
65 Comment=SIP softphone (VoIP)
66 Exec=xtensoftphone
67 Icon=firefox
68 Type=Application
69 Categories=Application;Network;
70 EOT
72 # Create pseudo package
73 cat > xlite-$VERSION/receipt <<EOT
74 PACKAGE="xlite"
75 VERSION="$VERSION"
76 CATEGORY="non-free"
77 SHORT_DESC="SIP soft phone."
78 WEB_SITE="$WEB_SITE"
79 DEPENDS="atk cairo expat fontconfig freetype glib gtk+ libglade libpng libxml2 \
80 pango pixman xorg-libX11 xorg-libXau xorg-libXcomposite xorg-libXcursor \
81 xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes xorg-libXft \
82 xorg-libXinerama xorg-libXrandr xorg-libXrender zlib libstdc++5"
83 EOT
85 # Pack
86 tazpkg pack xlite-$VERSION
88 # Clean to save RAM memory
89 rm -rf xlite-$VERSION
91 # Install pseudo package
92 tazpkg install xlite-$VERSION.tazpkg --root=$ROOT
94 # Clean
95 cd $CUR_DIR
96 rm -rf $TMP_DIR