diff options
Diffstat (limited to 'multimedia/QMPlay2/QMPlay2.SlackBuild')
-rw-r--r-- | multimedia/QMPlay2/QMPlay2.SlackBuild | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/multimedia/QMPlay2/QMPlay2.SlackBuild b/multimedia/QMPlay2/QMPlay2.SlackBuild index bdfdee018d..028e7c1b26 100644 --- a/multimedia/QMPlay2/QMPlay2.SlackBuild +++ b/multimedia/QMPlay2/QMPlay2.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # # Slackware build script for QMPlay2. # -# Copyright 2017-2019 Edinaldo P. Silva, Rio de Janeiro, Brazil. +# Copyright 2017-2024 Edinaldo P. Silva, Rio de Janeiro, Brazil. # 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=QMPlay2 -VERSION=${VERSION:-18.12.26} +VERSION=${VERSION:-24.04.07} 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} @@ -59,9 +69,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-src-$VERSION +tar xvf $CWD/$PRGNAM-src-$VERSION.tar.?z +cd $PRGNAM-src-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,17 +79,24 @@ 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 {} \; +mkdir build +cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ -DLANGUAGES=All \ - -DUSE_LINK_TIME_OPTIMIZATION=ON \ - -DUSE_JEMALLOC=OFF \ + -DUSE_LINK_TIME_OPTIMIZATION=OFF \ + -DUSE_GLSLC=OFF \ -DUSE_CHIPTUNE_SID=OFF \ - . + -DUSE_PCH=ON \ + -DUSE_GLSLC=OFF \ + -DUSE_GIT_VERSION=OFF \ + .. make make install DESTDIR=$PKG +cd .. 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 @@ -88,8 +105,11 @@ mv $PKG/usr/share/man $PKG/usr/man 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 +# to pass sbopkglint test... +rm -rf $PKG/usr/share/icons/hicolor/scalable + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp AUTHORS ChangeLog LICENSE README.md TODO $PKG/usr/doc/$PRGNAM-$VERSION +cp AUTHORS ChangeLog LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -97,4 +117,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 |