wok-current rev 3550

get-linuxqq: add stuff/get-linuxqq
author Liu Peng <rocky@slitaz.org>
date Tue Jun 23 13:59:17 2009 +0800 (2009-06-23)
parents 2b2c37045605
children dbf2180c7325
files get-linuxqq/receipt get-linuxqq/stuff/get-linuxqq
line diff
     1.1 --- a/get-linuxqq/receipt	Tue Jun 23 12:47:10 2009 +0800
     1.2 +++ b/get-linuxqq/receipt	Tue Jun 23 13:59:17 2009 +0800
     1.3 @@ -1,21 +1,14 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="get-linuxqq"
     1.7 -VERSION="v1.0.2-beta1"
     1.8 +VERSION="1.00"
     1.9  CATEGORY="non-free"
    1.10  SHORT_DESC="Instant messaging software from Tencent Inc."
    1.11  MAINTAINER="lufeng369@gmail.com"
    1.12 -WEB_SITE="http://im.qq.com"
    1.13 -SOURCE="linuxqq"
    1.14 -DEPENDS="gtk+ libsigc++"
    1.15 -TARBALL="$SOURCE-$VERSION.i386.rpm"
    1.16 -#BUILD_DEPENDS=""
    1.17 +WEB_SITE="http://im.qq.com/"
    1.18  
    1.19  genpkg_rules()
    1.20  {
    1.21 -   mkdir stuff/
    1.22 -        wget http://dl_dir.qq.com/linuxqq/$TARBALL -P stuff/
    1.23 -        rpm2cpio stuff/$TARBALL | (cd $fs && cpio -iudv)
    1.24 -
    1.25 +    mkdir -p $fs/usr/bin
    1.26 +    cp stuff/get-linuxqq $fs/usr/bin
    1.27  }
    1.28 -
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/get-linuxqq/stuff/get-linuxqq	Tue Jun 23 13:59:17 2009 +0800
     2.3 @@ -0,0 +1,56 @@
     2.4 +#!/bin/sh 
     2.5 +
     2.6 +# Get and install Tencent QQ for Linux
     2.7 +
     2.8 +PACKAGE="linuxqq"
     2.9 +VERSION="v1.0.2-beta1"
    2.10 +RPMPKG="$PACKAGE-$VERSION.i386.rpm"
    2.11 +URL="http://dl_dir.qq.com/linuxqq/$RPMPKG"
    2.12 +CUR_DIR=$(pwd)
    2.13 +TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$
    2.14 +ROOT="$1"
    2.15 +
    2.16 +# Check if we are root
    2.17 +if test $(id -u) != 0 ; then
    2.18 +    echo -e "\nYou must be root to run `basename $0`."
    2.19 +    echo -e "Please type 'su' and root password to become super-user.\n"
    2.20 +    exit 1
    2.21 +fi
    2.22 +
    2.23 +# Avoid reinstall
    2.24 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
    2.25 +    echo -e "\n$PACKAGE package is already installed.\n"
    2.26 +    exit 1
    2.27 +fi
    2.28 +
    2.29 +# Create a TEMP_DIR
    2.30 +mkdir $TEMP_DIR
    2.31 +cd $TEMP_DIR
    2.32 +
    2.33 +# Download the file
    2.34 +wget $URL 
    2.35 +
    2.36 +rpm2cpio $RPMPKG | cpio -dium
    2.37 +mkdir -p $PACKAGE-$VERSION/fs
    2.38 +mv $TEMP_DIR/usr $PACKAGE-$VERSION/fs
    2.39 +
    2.40 +cd $TEMP_DIR
    2.41 +
    2.42 +cat > $PACKAGE-$VERSION/receipt << EOT
    2.43 +PACKAGE="$PACKAGE"
    2.44 +VERSION="$VERSION"
    2.45 +CATEGORY="non-free"
    2.46 +SHORT_DESC="QQ for Linux $VERSION."
    2.47 +DEPENDS="gtk+"
    2.48 +WEB_SITE="http://im.qq.com/"
    2.49 +EOT
    2.50 +
    2.51 +# Pack
    2.52 +tazpkg pack $PACKAGE-$VERSION
    2.53 +
    2.54 +# Install pseudo package
    2.55 +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    2.56 +
    2.57 +# Clean
    2.58 +cd $CUR_DIR
    2.59 +rm -rf $TEMP_DIR