# HG changeset patch # User Pascal Bellard # Date 1416389242 -3600 # Node ID b46e1ac792fbf8f21ca55d22f6c35a54d7bb81ab # Parent db08c0205587d56852a74b0883be6c2d049633b0 Add FoxitReader diff -r db08c0205587 -r b46e1ac792fb FoxitReader --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FoxitReader Wed Nov 19 10:27:22 2014 +0100 @@ -0,0 +1,35 @@ +WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/" +WGET_URL=http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/linux/ +DEPENDS="gtk+" + +while true; do + TARBALL= + for i in $(wget -O - $WGET_URL | sed \ + "/href/!d;s/.*href=.\([^'\"]*\).*/\1/;/^[/?]/d"); do + case "$i" in + */) TARBALL=$i ;; + *deb) WGET_URL="$WGET_URL$i" + TARBALL=$i + break 2 ;; + esac + done + [ -z "$TARBALL" ] && echo "Package not found in $WGET_URL" exit 1 + WGET_URL="$WGET_URL$TARBALL" +done + +wget $WGET_URL +[ -f $TARBALL ] || abort_package "Could not download $TARBALL from $WGET_URL. Exiting." + +mkdir $PACKAGE +dpkg-deb -e $TARBALL $PACKAGE/meta +dpkg-deb -x $TARBALL $PACKAGE/fs +# extracted pkg can be removed: Save RAM +rm -f $TARBALL +false && sed '/^Description:/,$!d;s/^Description://' \ + < $PACKAGE/meta/control > $PACKAGE/description.txt + +SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)" +#MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)" +VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)" +mv $PACKAGE $PACKAGE-$VERSION +set +e