summaryrefslogtreecommitdiffstats
path: root/python/python3-openpyxl/python3-openpyxl.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/python3-openpyxl/python3-openpyxl.SlackBuild')
-rw-r--r--python/python3-openpyxl/python3-openpyxl.SlackBuild29
1 files changed, 17 insertions, 12 deletions
diff --git a/python/python3-openpyxl/python3-openpyxl.SlackBuild b/python/python3-openpyxl/python3-openpyxl.SlackBuild
index 549f270c18..e14195e3a7 100644
--- a/python/python3-openpyxl/python3-openpyxl.SlackBuild
+++ b/python/python3-openpyxl/python3-openpyxl.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for python3-openpyxl
-# Copyright 2020 Isaac Yu <isaacyu1@isaacyu1.com>
+# Copyright 2020-2023 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=python3-openpyxl
-VERSION=${VERSION:-3.0.3}
-COMMIT=${COMMIT:-ca7b1baf75f2}
+VERSION=${VERSION:-3.1.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=openpyxl
@@ -38,7 +40,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -58,9 +64,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$SRCNAM-$COMMIT
-tar xvf $CWD/$VERSION.tar.bz2
-cd $SRCNAM-$SRCNAM-$COMMIT
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -68,18 +74,17 @@ 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 {} \;
-python3 setup.py build
-python3 setup.py install --skip-build --root=$PKG
+python3 setup.py install --root=$PKG
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 *.rst *.txt doc/*.rst doc/*.txt doc/charts/*.rst $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS.rst CONTRIBUTING.txt LICENCE.rst README.rst $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE