wok-6.x view get-foxit-reader/stuff/get-foxit-reader @ rev 19370

ppp: remove pppnc (done by pppssh)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 09 11:14:54 2016 +0200 (2016-08-09)
parents e3cc7eaaf433
children
line source
1 #!/bin/sh
3 # Get and install FoxitReader for Linux
5 PACKAGE="FoxitReader"
6 VERSION="1.1-0"
7 RPMPKG="$PACKAGE-$VERSION.fc9.i386.rpm"
8 URL="http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/linux/1.x/1.1/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
32 if [ ! -f $RPMPKG ]; then
33 cd $CUR_DIR
34 rm -rf $TEMP_DIR
35 echo "Could not download $RPMPKG. Exiting."
36 exit 1
37 fi
39 rpm2cpio $RPMPKG | cpio -dium
41 # extracted pkg can be removed: Save RAM
42 rm -rf $RPMPKG
44 mkdir -p $PACKAGE-$VERSION/fs
45 mv $TEMP_DIR/usr $PACKAGE-$VERSION/fs
46 cd $PACKAGE-$VERSION/fs/usr/share/applications/ && mv fedora-Foxit-Reader.desktop Foxit-Reader.desktop
48 cd $TEMP_DIR
50 cat > $PACKAGE-$VERSION/receipt << EOT
51 PACKAGE="$PACKAGE"
52 VERSION="$VERSION"
53 CATEGORY="non-free"
54 SHORT_DESC="A free PDF document viewer for the Linux platform."
55 DEPENDS="gtk+ libcups"
56 WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/"
57 EOT
59 # Pack
60 tazpkg pack $PACKAGE-$VERSION gzip
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