python/pyPdf: Updated for version 1.26.0.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Brenton Earl 2016-12-13 16:56:06 +07:00 committed by Willy Sudiarto Raharjo
parent a295d07bc4
commit e5cc4ee0e2
3 changed files with 21 additions and 20 deletions

View file

@ -1,10 +1,10 @@
A Pure-Python library built as a PDF toolkit. It is capable of: A Pure-Python library built as a PDF toolkit. It is capable of:
* extracting document information (title, author, ...), * extracting document information (title, author, ...)
* splitting documents page by page, * splitting documents page by page
* merging documents page by page, * merging documents page by page
* cropping pages, * cropping pages
* merging multiple pages into a single page, * merging multiple pages into a single page
* encrypting and decrypting PDF files. * encrypting and decrypting PDF files
By being Pure-Python, it should run on any Python platform without any By being Pure-Python, it should run on any Python platform without any
dependencies on external libraries. It can also work entirely on StringIO dependencies on external libraries. It can also work entirely on StringIO

View file

@ -3,7 +3,7 @@
# Slackware build script for pyPdf. # Slackware build script for pyPdf.
# Copyright 2009-2011 Marco Bonetti <sid77@slackware.it> # Copyright 2009-2011 Marco Bonetti <sid77@slackware.it>
# Copyright 2015 Brenton Earl <brent@exitstatusone.com> # Copyright 2015-2016 Brenton Earl <brent@exitstatusone.com>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -24,7 +24,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pyPdf PRGNAM=pyPdf
VERSION=1.25.1 SRCNAM=pyPDF
VERSION=${VERSION:-1.26.0}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -32,7 +33,7 @@ SRCDIRNAM=PyPDF2
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
i?86) ARCH=i486 ;; i?86) ARCH=i586 ;;
arm*) ARCH=arm ;; arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;; *) ARCH=$( uname -m ) ;;
esac esac
@ -44,6 +45,7 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} OUTPUT=${OUTPUT:-/tmp}
DOCS="CHANGELOG LICENSE README.md" DOCS="CHANGELOG LICENSE README.md"
SAMPLES="Scripts/ Sample_Code/ Resources/"
set -e set -e
@ -51,23 +53,22 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $SRCDIRNAM-$VERSION rm -rf $SRCDIRNAM-$VERSION
tar xvf $CWD/$SRCDIRNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCDIRNAM-$VERSION cd $SRCDIRNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-exec chmod 755 {} \; -o \ -o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-exec chmod 644 {} \; -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python setup.py install --root=$PKG python setup.py install --root=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cp -ar $DOCS $SAMPLES $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install mkdir -p $PKG/install

View file

@ -1,8 +1,8 @@
PRGNAM="pyPdf" PRGNAM="pyPdf"
VERSION="1.25.1" VERSION="1.26.0"
HOMEPAGE="https://mstamy2.github.io/PyPDF2/" HOMEPAGE="https://mstamy2.github.io/PyPDF2/"
DOWNLOAD="https://github.com/mstamy2/PyPDF2/archive/v1.25.1.tar.gz" DOWNLOAD="https://github.com/mstamy2/PyPDF2/archive/1.26.0/pyPDF-1.26.0.tar.gz"
MD5SUM="c129a049d6612ea9aa06aac7fe10252b" MD5SUM="3959e3a15606e4b6c0405487cefb4e21"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES=""