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