# HG changeset patch # User Pascal Bellard # Date 1235651575 0 # Node ID fa8a5ded702ae3634c67bb5c766c7addbbdcf23b # Parent cbcb92602e3a41b859d8636732043c7799eb3f90 Add get-sjphone diff -r cbcb92602e3a -r fa8a5ded702a get-sjphone/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-sjphone/receipt Thu Feb 26 12:32:55 2009 +0000 @@ -0,0 +1,16 @@ +# SliTaz package receipt. + +PACKAGE="get-sjphone" +VERSION="1.00" +CATEGORY="non-free" +SHORT_DESC="Get SJphone soft phone." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.sjlabs.com/" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + cp stuff/get-sjphone $fs/usr/bin +} + diff -r cbcb92602e3a -r fa8a5ded702a get-sjphone/stuff/get-sjphone --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-sjphone/stuff/get-sjphone Thu Feb 26 12:32:55 2009 +0000 @@ -0,0 +1,68 @@ +#!/bin/sh -e + +ROOT="$1" + +if test $(id -u) != 0 ; then + echo -e "\nYou must be root to run `basename $0`." + echo -e "Please type 'su' and root password to become super-user.\n" + exit 0 +fi + +if [ -d $ROOT/var/lib/tazpkg/installed/sjphone ]; then + [ -n "$ROOT" ] && exit 1 + tazpkg remove sjphone + [ -d /var/lib/tazpkg/installed/sjphone ] && exit 1 +fi + +WEB_SITE="http://www.sjlabs.com/" +VERSION="1.60.299" +URL="http://www.sjphone.org/softphone/SJphoneLnx-299a.tar.gz" + +TMP_DIR=/tmp/get-sjphone-$$-$RANDOM +CUR_DIR=$(pwd) +mkdir -p $TMP_DIR && cd $TMP_DIR + +# Download tarball +wget $URL + +# Extract +tar xzf $(basename $URL) + +# Install files +dir=sjphone-$VERSION/fs +mkdir -p $dir/usr/bin $dir/usr/share/applications $dir/etc/sjphone +mv SJ*/lib $dir/usr/share/sjphone +mv SJ*/sjphone $dir/usr/bin +ln -s /etc/sjphone/defaults.ini $dir/usr/share/sjphone/defaults.ini +sed -i -e 's|WD=.*|WD=/usr/share/sjphone|' -e 's|WD/lib|WD|' \ + -e 's|ldd|#ldd|' $dir/usr/bin/sjphone +cat > $dir/usr/share/applications/sjphone.desktop < sjphone-$VERSION/receipt <