wok view get-foxit-reader/stuff/get-foxit-reader @ rev 3705

Upgrade: sylpheed (2.6.0 to 2.7.0) and add devel pkg
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jul 20 00:50:46 2009 +0200 (2009-07-20)
parents 0ba2f31c5d8d
children 32959e7975fc
line source
1 #!/bin/sh
3 # Get and install FoxitReader for Linux
5 PACKAGE="FoxitReader"
6 VERSION="1.0-1"
7 RPMPKG="$PACKAGE-$VERSION.i386.rpm"
8 URL="http://mirrors.foxitsoftware.com/pub/foxit/reader/desktop/linux/1.x/1.0/enu/$RPMPKG"
9 CUR_DIR=$(pwd)
10 TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$
11 ROOT="$1"
13 # Check if we are root
14 if test $(id -u) != 0 ; then
15 echo -e "\nYou must be root to run `basename $0`."
16 echo -e "Please type 'su' and root password to become super-user.\n"
17 exit 1
18 fi
20 # Avoid reinstall
21 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
22 echo -e "\n$PACKAGE package is already installed.\n"
23 exit 1
24 fi
26 # Create a TEMP_DIR
27 mkdir $TEMP_DIR
28 cd $TEMP_DIR
30 # Download the file
31 wget $URL
33 rpm2cpio $RPMPKG | cpio -dium
34 mkdir -p $PACKAGE-$VERSION/fs
35 mv $TEMP_DIR/usr $PACKAGE-$VERSION/fs
36 cd $PACKAGE-$VERSION/fs/usr/share/applications/ && mv fedora-Foxit-Reader.desktop Foxit-Reader.desktop
38 cd $TEMP_DIR
40 cat > $PACKAGE-$VERSION/receipt << EOT
41 PACKAGE="$PACKAGE"
42 VERSION="$VERSION"
43 CATEGORY="non-free"
44 SHORT_DESC="A free PDF document viewer for the Linux platform."
45 DEPENDS="gtk+"
46 WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/"
47 EOT
49 # Pack
50 tazpkg pack $PACKAGE-$VERSION
52 # Install pseudo package
53 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
55 # Clean
56 cd $CUR_DIR
57 rm -rf $TEMP_DIR