diff options
Diffstat (limited to 'audio/exhale/exhale.SlackBuild')
-rw-r--r-- | audio/exhale/exhale.SlackBuild | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/audio/exhale/exhale.SlackBuild b/audio/exhale/exhale.SlackBuild index 7b69e069b8..d1f057402b 100644 --- a/audio/exhale/exhale.SlackBuild +++ b/audio/exhale/exhale.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # ---------------------------------------------------------------------- # Slackware build script for exhale # -# Copyright (c) 2020 Andrew Strong, Blue Mountains, Australia. +# Copyright (c) 2020 - 2023 Andrew Strong, Blue Mountains, Australia. # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that @@ -23,10 +23,13 @@ # SUCH DAMAGE. # ---------------------------------------------------------------------- +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=exhale -VERSION=${VERSION:-1.0.7} +VERSION=${VERSION:-1.2.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,31 +39,30 @@ 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} -# SLKCFLAGS and LIBDIRSUFFIX are not used but remain in place for possible -# future use as exhale's installation routine matures. 'BUILD32=1' will -# build a 32bit exhale while 'BUILD32=0' will build a 64bit exhale: - if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" - BUILDTARGET="BUILD32=1" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" - BUILDTARGET="BUILD32=1" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" - BUILDTARGET="BUILD32=0" else - SLKCFLAGS="-O2" + SLKCFLAGS="-O2 -std=c++11" LIBDIRSUFFIX="" - BUILDTARGET="BUILD32=0" fi set -e @@ -79,12 +81,22 @@ 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 {} \; -# I will switch to the newer cmake build system and also install the newer -# shared library when support for exhale is added to FFmpeg and / or any -# other major Linux application. But for the moment: +mkdir -p build +cd build + cmake \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la -make $BUILDTARGET release -install -D -s -m 0755 bin/exhale $PKG/usr/bin/exhale +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/doc/$PRGNAM-$VERSION cp -a README.md include/{License.htm,Release.htm,styles.css} $PKG/usr/doc/$PRGNAM-$VERSION @@ -94,4 +106,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 |