|
foxit reader for Linux 终于出了1.0正式版。
在slackware下写了简单的脚本方便大家用。
到官方网站上下载 rpm包。
脚本如下 foxit-reader.SlackBuild
- #!/bin/sh
- # Slackware build script for foxit-reader for linux
- PRGNAM=foxit-reader
- VERSION=${VERSION:-1.0}
- ARCH=${ARCH:-i386}
- BUILD=${BUILD:-1}
- TAG=${TAG:-_SBo}
- CWD=$(pwd)
- TMP=${TMP:-/tmp/SBo}
- PKG=$TMP/package-$PRGNAM
- OUTPUT=${OUTPUT:-/tmp}
- set -e
- rm -rf $PKG
- mkdir -p $TMP $PKG $OUTPUT
- cd $PKG
- rpm2targz $CWD/FoxitReader-$VERSION-1.$ARCH.rpm
- tar xvzf *.tar.gz
- rm *.tar.gz
- # rename the desktop file name
- cd usr/share/applications
- mv fedora-Foxit-Reader.desktop foxit-reader.desktop
- # fix the perm right
- cd $PKG
- chown -R root:root .
- find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
- # add the link
- ( cd $PKG/usr/bin
- ln -s FoxitReader foxitreader
- )
- # rip the file
- ( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- )
- mkdir -p $PKG/install
- cat $CWD/slack-desc > $PKG/install/slack-desc
- cd $PKG
- /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
复制代码
slack-desc 文件
- # HOW TO EDIT THIS FILE:
- # The "handy ruler" below makes it easier to edit a package description. Line
- # up the first '|' above the ':' following the base package name, and the '|'
- # on the right side marks the last column you can put a character in. You must
- # make exactly 11 lines for the formatting to be correct. It's also
- # customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------|
- foxit-reader: Foxit Reader for Desktop Linux
- foxit-reader:
- foxit-reader: Foxit Reader is a free PDF document viewer for the
- foxit-reader: Linux platform, with a new streamlined interface,
- foxit-reader: user-customized toolbar, incredibly small size,
- foxit-reader: breezing-fast launch speed and rich features.
- foxit-reader:
- foxit-reader: Foxit Reader for Desktop Linux is provided by Foxit
- foxit-reader: Software Company free for non-commercial use.
- foxit-reader:
- foxit-reader: home: http://www.foxitsoftware.com/
复制代码 |
|