diff options
Diffstat (limited to 'multimedia/Mopidy/Mopidy.SlackBuild')
-rw-r--r-- | multimedia/Mopidy/Mopidy.SlackBuild | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/multimedia/Mopidy/Mopidy.SlackBuild b/multimedia/Mopidy/Mopidy.SlackBuild index 6a99d52c82..14fcc9fc12 100644 --- a/multimedia/Mopidy/Mopidy.SlackBuild +++ b/multimedia/Mopidy/Mopidy.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Mopidy -# Copyright 2014-2017 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2014-2023 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +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=Mopidy -VERSION=${VERSION:-2.1.0} +VERSION=${VERSION:-3.4.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,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} @@ -69,16 +79,25 @@ 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 -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/man/man1 -cp $CWD/mopidy.1.gz $PKG/usr/man/man1/mopidy.1.gz +mkdir -p $PKG/usr/bin +install -m0755 extra/mopidyctl/mopidyctl $PKG/usr/bin + +mkdir -p $PKG/usr/share/applications +cp extra/desktop/mopidy.desktop $PKG/usr/share/applications/ + +mkdir -p $PKG/usr/man/man8 +cp extra/mopidyctl/mopidyctl.8 $PKG/usr/man/man8 + +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 AUTHORS LICENSE PKG-INFO README.rst $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS LICENSE PKG-INFO README.rst docs/*.rst $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -86,4 +105,4 @@ 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 |