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