wok-4.x rev 3558
Add get-foxit-reader
author | Liu Peng <rocky@slitaz.org> |
---|---|
date | Wed Jun 24 18:02:11 2009 +0800 (2009-06-24) |
parents | dbf2180c7325 |
children | 0ba2f31c5d8d |
files | get-foxit-reader/receipt get-foxit-reader/stuff/get-foxit-reader |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-foxit-reader/receipt Wed Jun 24 18:02:11 2009 +0800 1.3 @@ -0,0 +1,14 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-foxit-reader" 1.7 +VERSION="1.00" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="A free PDF document viewer for the Linux platform." 1.10 +MAINTAINER="rocky@slitaz.org" 1.11 +WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/" 1.12 + 1.13 +genpkg_rules() 1.14 +{ 1.15 + mkdir -p $fs/usr/bin 1.16 + cp stuff/get-foxit-reader $fs/usr/bin 1.17 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-foxit-reader/stuff/get-foxit-reader Wed Jun 24 18:02:11 2009 +0800 2.3 @@ -0,0 +1,65 @@ 2.4 +#!/bin/sh 2.5 + 2.6 +# Get and install Tencent QQ for Linux 2.7 + 2.8 +PACKAGE="FoxitReader" 2.9 +VERSION="1.0-1" 2.10 +TARBALL="$PACKAGE-$VERSION.i386.tar.bz2" 2.11 +URL="http://mirrors.foxitsoftware.com/pub/foxit/reader/desktop/linux/1.x/1.0/enu/$TARBALL" 2.12 +CUR_DIR=$(pwd) 2.13 +TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$ 2.14 +ROOT="$1" 2.15 + 2.16 +# Check if we are root 2.17 +if test $(id -u) != 0 ; then 2.18 + echo -e "\nYou must be root to run `basename $0`." 2.19 + echo -e "Please type 'su' and root password to become super-user.\n" 2.20 + exit 1 2.21 +fi 2.22 + 2.23 +# Avoid reinstall 2.24 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then 2.25 + echo -e "\n$PACKAGE package is already installed.\n" 2.26 + exit 1 2.27 +fi 2.28 + 2.29 +# Create a TEMP_DIR 2.30 +mkdir $TEMP_DIR 2.31 +cd $TEMP_DIR 2.32 + 2.33 +# Download the file 2.34 +wget $URL 2.35 + 2.36 +tar xjf $TARBALL 2.37 +mkdir -p $PACKAGE-$VERSION/fs/usr/share/FoxitReader $PACKAGE-$VERSION/fs/usr/bin 2.38 +mv FoxitReader Readme.txt fum.fhd fpdfcjk.bin $PACKAGE-$VERSION/fs/usr/share/FoxitReader 2.39 + 2.40 +# Custom FoxitReader 2.41 +cat > $PACKAGE-$VERSION/fs/usr/bin/FoxitReader << "EOT" 2.42 +#!/bin/sh 2.43 +PAR=/usr/share/FoxitReader 2.44 +exec $PAR/FoxitReader $@ 2.45 +EOT 2.46 + 2.47 +chmod +x $PACKAGE-$VERSION/fs/usr/bin/FoxitReader 2.48 + 2.49 +cd $TEMP_DIR 2.50 + 2.51 +cat > $PACKAGE-$VERSION/receipt << EOT 2.52 +PACKAGE="$PACKAGE" 2.53 +VERSION="$VERSION" 2.54 +CATEGORY="non-free" 2.55 +SHORT_DESC="A free PDF document viewer for the Linux platform." 2.56 +DEPENDS="gtk+" 2.57 +WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/" 2.58 +EOT 2.59 + 2.60 +# Pack 2.61 +tazpkg pack $PACKAGE-$VERSION 2.62 + 2.63 +# Install pseudo package 2.64 +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 2.65 + 2.66 +# Clean 2.67 +cd $CUR_DIR 2.68 +rm -rf $TEMP_DIR