wok-4.x rev 2317
Add get-xlite
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 26 10:47:47 2009 +0000 (2009-02-26) |
parents | e0584b04753f |
children | fa8a5ded702a |
files | get-xlite/receipt get-xlite/stuff/get-xlite |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-xlite/receipt Thu Feb 26 10:47:47 2009 +0000 1.3 @@ -0,0 +1,16 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-xlite" 1.7 +VERSION="1.00" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="Get Xlite soft phone." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://www.counterpath.net/" 1.12 + 1.13 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.14 +genpkg_rules() 1.15 +{ 1.16 + mkdir -p $fs/usr/bin 1.17 + cp stuff/get-xlite $fs/usr/bin 1.18 +} 1.19 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-xlite/stuff/get-xlite Thu Feb 26 10:47:47 2009 +0000 2.3 @@ -0,0 +1,70 @@ 2.4 +#!/bin/sh -e 2.5 +: ${DIALOG=tazdialog} 2.6 + 2.7 +ROOT="$1" 2.8 + 2.9 +if test $(id -u) != 0 ; then 2.10 + echo -e "\nYou must be root to run `basename $0`." 2.11 + echo -e "Please type 'su' and root password to become super-user.\n" 2.12 + exit 0 2.13 +fi 2.14 + 2.15 +if [ -d $ROOT/var/lib/tazpkg/installed/xlite ]; then 2.16 + [ -n "$ROOT" ] && exit 1 2.17 + tazpkg remove xlite 2.18 + [ -d /var/lib/tazpkg/installed/xlite ] && exit 1 2.19 +fi 2.20 + 2.21 +WEB_SITE="http://www.counterpath.net/" 2.22 +URL="http://counterpath.s3.amazonaws.com/downloads/X-Lite_Install.tar.gz" 2.23 +URLLIB="http://http.us.debian.org/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-18_i386.deb" 2.24 + 2.25 +TMP_DIR=/tmp/get-xlite-$$-$RANDOM 2.26 +CUR_DIR=$(pwd) 2.27 +mkdir -p $TMP_DIR && cd $TMP_DIR 2.28 + 2.29 +# Download tarball 2.30 +wget $URL 2.31 +wget $URLLIB 2.32 + 2.33 +# Extract 2.34 +tar xzf $(basename $URL) 2.35 + 2.36 +VERSION="$(strings xten-xlite/xtensoftphone | grep ^Version | sed 's/.*="\(.*\)"/\1/')" 2.37 + 2.38 +# Install files 2.39 +dir=xlite-$VERSION/fs 2.40 +mkdir -p $dir/usr/bin $dir/usr/share/applications 2.41 +mv xten-xlite/xtensoftphone $dir/usr/bin 2.42 +ln -s xtensoftphone $dir/usr/bin/xlite 2.43 +cat > $dir/usr/share/applications/xlite.desktop <<EOT 2.44 +[Desktop Entry] 2.45 +Encoding=UTF-8 2.46 +Name=Xlite softphone 2.47 +Comment=SIP softphone (VoIP) 2.48 +Exec=xtensoftphone 2.49 +Icon=firefox.png 2.50 +Type=Application 2.51 +Categories=Application;Network; 2.52 +EOT 2.53 +dpkg-deb -x $(basename $URLLIB) $dir 2.54 +rm -rf $dir/usr/share/doc 2.55 + 2.56 +# Create pseudo package 2.57 +cat > xlite-$VERSION/receipt <<EOT 2.58 +PACKAGE="xlite" 2.59 +VERSION="$VERSION" 2.60 +CATEGORY="non-free" 2.61 +SHORT_DESC="Get Xlite soft phone." 2.62 +WEB_SITE="$WEB_SITE" 2.63 +EOT 2.64 + 2.65 +# Pack 2.66 +tazpkg pack xlite-$VERSION 2.67 + 2.68 +# Install pseudo package 2.69 +tazpkg install xlite-$VERSION.tazpkg --root=$ROOT 2.70 + 2.71 +# Clean 2.72 +cd $CUR_DIR 2.73 +rm -rf $TMP_DIR