summaryrefslogtreecommitdiffstats
path: root/audio/quodlibet/quodlibet.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/quodlibet/quodlibet.SlackBuild')
-rw-r--r--audio/quodlibet/quodlibet.SlackBuild39
1 files changed, 27 insertions, 12 deletions
diff --git a/audio/quodlibet/quodlibet.SlackBuild b/audio/quodlibet/quodlibet.SlackBuild
index 5194500dad..1d9c2e961c 100644
--- a/audio/quodlibet/quodlibet.SlackBuild
+++ b/audio/quodlibet/quodlibet.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for quodlibet.
#
-# Copyright 2016-2017 Edinaldo P. Silva, Rio de Janeiro, Brazil.
# Written by K.D.Hedger kdhedger@yahoo.co.uk
+# Copyright 2016-2017 Edinaldo P. Silva, Rio de Janeiro, Brazil.
+# Copyright 2020-2022 Nick Smallbone, Gothenburg, Sweden.
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,10 +24,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=quodlibet
-VERSION=${VERSION:-3.9.1}
+VERSION=${VERSION:-4.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +40,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}
@@ -57,30 +68,34 @@ fi
set -e
-SRCNAM="release"
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$SRCNAM-$VERSION.tar.gz
-mv $PRGNAM-$SRCNAM-$VERSION $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION/$PRGNAM
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
+find $PKG/usr/share/man -type f -exec chmod 0644 {} \;
mv $PKG/usr/share/man $PKG/usr
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING NEWS.rst README.rst $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+DOCS=${DOCS:-no}
+if [ $DOCS = yes ] || [ $DOCS = y ] || [ $DOCS = true ]; then
+ python3 setup.py build_sphinx
+ cp -a build/sphinx $PKG/usr/doc/$PRGNAM-$VERSION/user_guide
+fi
+
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