wok-next rev 2318
Add get-sjphone
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 26 12:32:55 2009 +0000 (2009-02-26) |
parents | cbcb92602e3a |
children | 5722056d2bd3 |
files | get-sjphone/receipt get-sjphone/stuff/get-sjphone get-xlite/stuff/get-xlite |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-sjphone/receipt Thu Feb 26 12:32:55 2009 +0000 1.3 @@ -0,0 +1,16 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-sjphone" 1.7 +VERSION="1.00" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="Get SJphone soft phone." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://www.sjlabs.com/" 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-sjphone $fs/usr/bin 1.18 +} 1.19 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-sjphone/stuff/get-sjphone Thu Feb 26 12:32:55 2009 +0000 2.3 @@ -0,0 +1,68 @@ 2.4 +#!/bin/sh -e 2.5 + 2.6 +ROOT="$1" 2.7 + 2.8 +if test $(id -u) != 0 ; then 2.9 + echo -e "\nYou must be root to run `basename $0`." 2.10 + echo -e "Please type 'su' and root password to become super-user.\n" 2.11 + exit 0 2.12 +fi 2.13 + 2.14 +if [ -d $ROOT/var/lib/tazpkg/installed/sjphone ]; then 2.15 + [ -n "$ROOT" ] && exit 1 2.16 + tazpkg remove sjphone 2.17 + [ -d /var/lib/tazpkg/installed/sjphone ] && exit 1 2.18 +fi 2.19 + 2.20 +WEB_SITE="http://www.sjlabs.com/" 2.21 +VERSION="1.60.299" 2.22 +URL="http://www.sjphone.org/softphone/SJphoneLnx-299a.tar.gz" 2.23 + 2.24 +TMP_DIR=/tmp/get-sjphone-$$-$RANDOM 2.25 +CUR_DIR=$(pwd) 2.26 +mkdir -p $TMP_DIR && cd $TMP_DIR 2.27 + 2.28 +# Download tarball 2.29 +wget $URL 2.30 + 2.31 +# Extract 2.32 +tar xzf $(basename $URL) 2.33 + 2.34 +# Install files 2.35 +dir=sjphone-$VERSION/fs 2.36 +mkdir -p $dir/usr/bin $dir/usr/share/applications $dir/etc/sjphone 2.37 +mv SJ*/lib $dir/usr/share/sjphone 2.38 +mv SJ*/sjphone $dir/usr/bin 2.39 +ln -s /etc/sjphone/defaults.ini $dir/usr/share/sjphone/defaults.ini 2.40 +sed -i -e 's|WD=.*|WD=/usr/share/sjphone|' -e 's|WD/lib|WD|' \ 2.41 + -e 's|ldd|#ldd|' $dir/usr/bin/sjphone 2.42 +cat > $dir/usr/share/applications/sjphone.desktop <<EOT 2.43 +[Desktop Entry] 2.44 +Encoding=UTF-8 2.45 +Name=SJphone 2.46 +Comment=SIP/H323 softphone (VoIP) 2.47 +Exec=sjphone 2.48 +Icon=/usr/share/sjphone/sjphone.png 2.49 +Type=Application 2.50 +Categories=Application;Network; 2.51 +EOT 2.52 + 2.53 +# Create pseudo package 2.54 +cat > sjphone-$VERSION/receipt <<EOT 2.55 +PACKAGE="sjphone" 2.56 +VERSION="$VERSION" 2.57 +CATEGORY="non-free" 2.58 +SHORT_DESC="SIP/H323 soft phone." 2.59 +WEB_SITE="$WEB_SITE" 2.60 +CONFIG_FILES="/etc/sjphone" 2.61 +EOT 2.62 + 2.63 +# Pack 2.64 +tazpkg pack sjphone-$VERSION 2.65 + 2.66 +# Install pseudo package 2.67 +tazpkg install sjphone-$VERSION.tazpkg --root=$ROOT 2.68 + 2.69 +# Clean 2.70 +cd $CUR_DIR 2.71 +rm -rf $TMP_DIR
3.1 --- a/get-xlite/stuff/get-xlite Thu Feb 26 10:47:47 2009 +0000 3.2 +++ b/get-xlite/stuff/get-xlite Thu Feb 26 12:32:55 2009 +0000 3.3 @@ -1,5 +1,4 @@ 3.4 #!/bin/sh -e 3.5 -: ${DIALOG=tazdialog} 3.6 3.7 ROOT="$1" 3.8 3.9 @@ -55,7 +54,7 @@ 3.10 PACKAGE="xlite" 3.11 VERSION="$VERSION" 3.12 CATEGORY="non-free" 3.13 -SHORT_DESC="Get Xlite soft phone." 3.14 +SHORT_DESC="SIP soft phone." 3.15 WEB_SITE="$WEB_SITE" 3.16 EOT 3.17