aboutsummaryrefslogtreecommitdiff
path: root/python/pyPdf/pyPdf.SlackBuild
diff options
context:
space:
mode:
authorBrenton Earl <brent@exitstatusone.com>2016-12-13 16:56:06 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-12-13 16:56:06 +0700
commite5cc4ee0e2fc4551754c2c9c12d1568eb64dbe8b (patch)
tree987525360b20c0b2882d70d9b53e6b02321f7ff9 /python/pyPdf/pyPdf.SlackBuild
parenta295d07bc4b604b902e41dd2641b06a2ecc5e23f (diff)
downloadslackbuilds-e5cc4ee0e2fc4551754c2c9c12d1568eb64dbe8b.tar.xz
python/pyPdf: Updated for version 1.26.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/pyPdf/pyPdf.SlackBuild')
-rw-r--r--python/pyPdf/pyPdf.SlackBuild23
1 files changed, 12 insertions, 11 deletions
diff --git a/python/pyPdf/pyPdf.SlackBuild b/python/pyPdf/pyPdf.SlackBuild
index 1f5f7149a504..505583998add 100644
--- a/python/pyPdf/pyPdf.SlackBuild
+++ b/python/pyPdf/pyPdf.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for pyPdf.
# 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.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pyPdf
-VERSION=1.25.1
+SRCNAM=pyPDF
+VERSION=${VERSION:-1.26.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -32,7 +33,7 @@ SRCDIRNAM=PyPDF2
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -44,6 +45,7 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="CHANGELOG LICENSE README.md"
+SAMPLES="Scripts/ Sample_Code/ Resources/"
set -e
@@ -51,23 +53,22 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
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
-
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
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
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
mkdir -p $PKG/install