wok-stable view get-foxit-reader/stuff/get-foxit-reader @ rev 3559

Add poppler-data
get-foxit-reader: download, extract foxit-reader(use rpm package)
author Liu Peng <rocky@slitaz.org>
date Wed Jun 24 20:27:09 2009 +0800 (2009-06-24)
parents 52621cb45fad
children 5b931c2fda37
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
37 cd $TEMP_DIR
39 cat > $PACKAGE-$VERSION/receipt << EOT
40 PACKAGE="$PACKAGE"
41 VERSION="$VERSION"
42 CATEGORY="non-free"
43 SHORT_DESC="A free PDF document viewer for the Linux platform."
44 DEPENDS="gtk+"
45 WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/"
46 EOT
48 # Pack
49 tazpkg pack $PACKAGE-$VERSION
51 # Install pseudo package
52 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
54 # Clean
55 cd $CUR_DIR
56 rm -rf $TEMP_DIR