summaryrefslogtreecommitdiffstats
path: root/multimedia/picard-plugins/picard-plugins.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/picard-plugins/picard-plugins.SlackBuild')
-rw-r--r--multimedia/picard-plugins/picard-plugins.SlackBuild54
1 files changed, 30 insertions, 24 deletions
diff --git a/multimedia/picard-plugins/picard-plugins.SlackBuild b/multimedia/picard-plugins/picard-plugins.SlackBuild
index b22de76ca6..ec49540ca3 100644
--- a/multimedia/picard-plugins/picard-plugins.SlackBuild
+++ b/multimedia/picard-plugins/picard-plugins.SlackBuild
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for "picard-plugins".
# Copyright 2015 Marcel Saegebarth <marc@mos6581.de>
-# Copyright 2018 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
+# Copyright 2018-2024 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -25,12 +25,14 @@
# (INCLUDING NEGLIGENCE OR 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=picard-plugins
-DSTNAM=picard
-VERSION=${VERSION:-7d0cf37}
-COMMIT=${COMMIT:-7d0cf37373e35dcb43ff6597ca2a0becb1406f90}
+VERSION=${VERSION:-1fd3cfe}
+COMMIT=${COMMIT:-1fd3cfe9b7eeeebdd33e85b60c7dfb89f2adfcce}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -40,21 +42,15 @@ 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}
-if [ "$ARCH" = "i586" ]; then
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- LIBDIRSUFFIX="64"
-else
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -70,13 +66,23 @@ 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 {} \;
-PYTHONDIR=$(python -c "import sys, os; print os.path.join('/usr/lib${LIBDIRSUFFIX}', 'python%s' % sys.version[:3], 'site-packages')")
-mkdir -p $PKG/$PYTHONDIR/$DSTNAM/plugins
-(
- cd plugins
- find . -maxdepth 2 -name '__init__.py' -printf '%h\n'|xargs mv -t $PKG/$PYTHONDIR/$DSTNAM/plugins/
- cp -a */* $PKG/$PYTHONDIR/$DSTNAM/plugins/
-)
+PYTHONDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')
+PLUGINDIR=$PKG/$PYTHONDIR/picard/plugins
+mkdir -p $PLUGINDIR
+
+# Delete haikuattrs plugin as it is only for the Haiku operating system
+rm -rf plugins/haikuattrs
+
+# Move over all directories containing __init__.py
+find plugins/ -maxdepth 2 -name '__init__.py' -printf '%h\n' | xargs mv -t $PLUGINDIR
+
+# Copy over all the remaining .py files
+cp plugins/*/*.py $PLUGINDIR
+
+# Delete bpm plugin if aubio & python3-numpy dependencies are not available
+if ! python3 -c "import aubio; import numpy"; then
+ rm -rf $PLUGINDIR/bpm
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION
@@ -86,4 +92,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