summaryrefslogtreecommitdiffstats
path: root/audio/pd/pd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/pd/pd.SlackBuild')
-rw-r--r--audio/pd/pd.SlackBuild32
1 files changed, 25 insertions, 7 deletions
diff --git a/audio/pd/pd.SlackBuild b/audio/pd/pd.SlackBuild
index 977741b4f6..ea734155ad 100644
--- a/audio/pd/pd.SlackBuild
+++ b/audio/pd/pd.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Pure Data
@@ -15,11 +15,14 @@
# - added SRCVERSION (2017)
# - correct .desktop Exec (2017)
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pd
-VERSION=${VERSION:-0.48_1}
+VERSION=${VERSION:-0.50_2}
SRCVERSION=$(echo $VERSION | tr _ -)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
@@ -30,7 +33,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}
@@ -82,7 +92,6 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$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
@@ -93,8 +102,8 @@ mkdir -p $PKG/usr/share/$PRGNAM
# Change the .desktop to point in correct executable.
sed "s+Exec=pd+Exec=/usr/lib${LIBDIRSUFFIX}/$PRGNAM/bin/$PRGNAM+" $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-convert $TMP/$PRGNAM-$SRCVERSION/src/pd.ico $TMP/${PRGNAM}_48.xpm
-cp $TMP/${PRGNAM}_48-3.xpm $PKG/usr/share/$PRGNAM
+convert $TMP/$PRGNAM-$SRCVERSION/tcl/pd.ico $TMP/${PRGNAM}\_${SRCVERSION}.xpm
+cp $TMP/${PRGNAM}\_${SRCVERSION}-3.xpm $PKG/usr/share/$PRGNAM/${PRGNAM}\_${SRCVERSION}-3.xpm
# copy all header files (for pd_mrpeach)
cp -p $TMP/$PRGNAM-$SRCVERSION/src/*.h $PKG/usr/include/
@@ -107,11 +116,20 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a INSTALL.txt README.txt LICENSE.txt src/CHANGELOG.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# native documentation wants this
ln -s /usr/lib/pd/doc/ $PKG/usr/doc/$PRGNAM-$VERSION/docs
+# pd-gui wants this:
+# Error in startup script: couldn't execute "/usr/lib64/pd/tcl/../bin/pd":
+# no such file or directory
+cd $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/bin/
+# remove bad (temp) link
+rm ./pd
+ln -s ../../../bin/$PRGNAM ./$PRGNAM
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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