wok-next annotate get-wakoopa/stuff/get-wakoopa @ rev 5136

Update fr pt locale pack
author Christophe Lincoln <pankso@slitaz.org>
date Tue Mar 23 20:26:32 2010 +0100 (2010-03-23)
parents 007b91d3da0b
children 60e17092a7b7
rev   line source
rocky@4077 1 #!/bin/sh
rocky@4077 2 # Wakoopa is the perfect place to discover software and games online.
rocky@4077 3
rocky@4077 4 PACKAGE="wakoopa"
rocky@4077 5 VERSION="1.1.1-2"
rocky@4077 6 RPMPKG="$PACKAGE-$VERSION.i386.rpm"
rocky@4077 7 URL="http://apt.wakoopa.com/$RPMPKG"
rocky@4077 8 CUR_DIR=$(pwd)
rocky@4077 9 TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$
rocky@4077 10 ROOT="$1"
rocky@4077 11
rocky@4077 12 # Check if we are root
rocky@4077 13 if test $(id -u) != 0 ; then
rocky@4077 14 echo -e "\nYou must be root to run `basename $0`."
rocky@4077 15 echo -e "Please type 'su' and root password to become super-user.\n"
rocky@4077 16 exit 1
rocky@4077 17 fi
rocky@4077 18
rocky@4077 19 # Avoid reinstall
rocky@4077 20 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
rocky@4077 21 echo -e "\n$PACKAGE package is already installed.\n"
rocky@4077 22 exit 1
rocky@4077 23 fi
rocky@4077 24
rocky@4077 25 # Create a TEMP_DIR
rocky@4077 26 mkdir $TEMP_DIR
rocky@4077 27 cd $TEMP_DIR
rocky@4077 28
rocky@4077 29 # Download the file
rocky@4077 30 wget $URL
rocky@4077 31 if [ ! -f $RPMPKG ]; then
rocky@4077 32 cd $CUR_DIR
rocky@4077 33 rm -rf $TEMP_DIR
rocky@4077 34 echo "Could not download $RPMPKG. Exiting."
rocky@4077 35 exit 1
rocky@4077 36 fi
rocky@4077 37
rocky@4077 38 rpm2cpio $RPMPKG | cpio -dium
jozee@4994 39
jozee@4994 40 # extracted pkg can be removed: Save RAM
jozee@4994 41 rm -rf $RPMPKG
jozee@4994 42
rocky@4077 43 mkdir -p $PACKAGE-$VERSION/fs
rocky@4077 44 mv $TEMP_DIR/usr $PACKAGE-$VERSION/fs
rocky@5082 45 # updated desktop menu
rocky@5082 46 sed -i 's/Categories=.*/Categories=Network;/g' wakoopa.desktop 2> /dev/null
rocky@4077 47
rocky@4077 48 cd $TEMP_DIR
rocky@4077 49
rocky@4077 50 cat > $PACKAGE-$VERSION/receipt << EOT
rocky@4077 51 PACKAGE="$PACKAGE"
rocky@4077 52 VERSION="$VERSION"
rocky@4077 53 CATEGORY="non-free"
rocky@4077 54 SHORT_DESC="Wakoopa Desktop Tracker."
rocky@4077 55 DEPENDS="gtk+"
rocky@4077 56 WEB_SITE="http://wakoopa.com"
rocky@4077 57 EOT
rocky@4077 58
rocky@4077 59 # Pack
rocky@4077 60 tazpkg pack $PACKAGE-$VERSION
rocky@4077 61
jozee@4994 62 # Clean to save RAM memory
jozee@4994 63 rm -rf $PACKAGE-$VERSION
jozee@4994 64
rocky@4077 65 # Install pseudo package
rocky@4077 66 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
rocky@4077 67
rocky@4077 68 # Clean
rocky@4077 69 cd $CUR_DIR
rocky@4077 70 rm -rf $TEMP_DIR