summaryrefslogtreecommitdiffstats
path: root/python/dfdatetime/dfdatetime.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/dfdatetime/dfdatetime.SlackBuild')
-rw-r--r--python/dfdatetime/dfdatetime.SlackBuild27
1 files changed, 19 insertions, 8 deletions
diff --git a/python/dfdatetime/dfdatetime.SlackBuild b/python/dfdatetime/dfdatetime.SlackBuild
index 1b934c5367..bccbdbb1a6 100644
--- a/python/dfdatetime/dfdatetime.SlackBuild
+++ b/python/dfdatetime/dfdatetime.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for dfdatetime
-# Copyright 2016-2019 Barry Grundy <bgrundy[at]linuxleo.com>
+# Copyright 2016-2023 Barry Grundy <bgrundy[at]linuxleo.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,12 +21,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Updated to v20190116 March 2019
+# Updated to v20230506 July 2023
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dfdatetime
-VERSION=${VERSION:-20190116}
+VERSION=${VERSION:-20230506}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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}
@@ -70,13 +80,14 @@ 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
find $PKG | xargs 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 README LICENSE AUTHORS PKG-INFO ACKNOWLEDGEMENTS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README LICENSE docs/ $PKG/usr/doc/$PRGNAM-$VERSION
+
# Remove duplicated docs in /usr/share/doc
rm -rf $PKG/usr/share
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -85,4 +96,4 @@ 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