aboutsummaryrefslogtreecommitdiff
path: root/python/PyPDF2/PyPDF2.SlackBuild
diff options
context:
space:
mode:
authorVijay Marcel <vijaymarcel@outlook.com>2023-06-23 07:23:10 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-06-23 07:23:10 +0700
commit906f37a48ea7c6feac6c6ead1e0b8240b26d2f89 (patch)
treea2b74501bfc3f0fbf66ee00e10c76694df459d41 /python/PyPDF2/PyPDF2.SlackBuild
parent142efb3f9d82a1a36fd7266d16404292c3c745ed (diff)
python/PyPDF2: Update source.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/PyPDF2/PyPDF2.SlackBuild')
-rw-r--r--python/PyPDF2/PyPDF2.SlackBuild32
1 files changed, 10 insertions, 22 deletions
diff --git a/python/PyPDF2/PyPDF2.SlackBuild b/python/PyPDF2/PyPDF2.SlackBuild
index 9e67b2f982..e7fd2ff9c7 100644
--- a/python/PyPDF2/PyPDF2.SlackBuild
+++ b/python/PyPDF2/PyPDF2.SlackBuild
@@ -4,6 +4,7 @@
# Copyright 2009-2011 Marco Bonetti <sid77@slackware.it>
# Copyright 2015-2017 Brenton Earl <brent@exitstatusone.com>
+# Copyright 2023 Vijay Marcel
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +27,6 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=PyPDF2
-SRCNAM=pypdf
VERSION=${VERSION:-1.26.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -52,28 +52,15 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="CHANGELOG LICENSE README.md"
SAMPLES="Scripts/ Sample_Code/ Resources/"
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+rm -rvf $PKG
+mkdir -pv $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION
+rm -rvf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -81,8 +68,8 @@ find -L . \
\( -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
-python3 setup.py install --root=$PKG
+python2 setup.py install --prefix=/usr --root=$PKG --optimize=1
+python3 setup.py install --prefix=/usr --root=$PKG --optimize=1
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
@@ -90,6 +77,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
mkdir -p $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
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc