diff options
Diffstat (limited to 'audio/amSynth/amSynth.SlackBuild')
-rw-r--r-- | audio/amSynth/amSynth.SlackBuild | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/audio/amSynth/amSynth.SlackBuild b/audio/amSynth/amSynth.SlackBuild index 7bb1520260..fc539c57ab 100644 --- a/audio/amSynth/amSynth.SlackBuild +++ b/audio/amSynth/amSynth.SlackBuild @@ -1,8 +1,9 @@ #!/bin/sh -# Slackware build script for amSynth +# Slackware build script for amsynth -# Copyright (C) 2006 paul wisehart wise@lupulin.net +# Copyright 2006 paul wisehart wise@lupulin.net +# Copyright 2019 Johannes Schoepfer, Germany # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,17 +23,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Modified by the SlackBuilds.org project - PRGNAM=amSynth -SRCNAM=amsynth -VERSION=${VERSION:-1.6.3} +VERSION=${VERSION:-1.9.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -43,8 +41,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -62,9 +60,11 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-release-$VERSION -tar xvf $CWD/release-$VERSION.tar.gz || tar xvf $CWD/$SRCNAM-release-$VERSION.tar.gz -cd $SRCNAM-release-$VERSION +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +#cd $PRGNAM-$VERSION +# Since the source doesn't contain "S" ..., i'd like to rename this package for a reason +cd amsynth-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -72,20 +72,31 @@ 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 {} \; -./autogen.sh CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS -std=c++11" \ +CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ - --enable-static=no \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --enable-shared \ + --disable-static \ --build=$ARCH-slackware-linux make make install-strip 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 + +# only if pandoc is present +if [ -d $PKG/usr/man ]; then + 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 +fi + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS COPYING INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -94,5 +105,14 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +# Only add capability stuff if not disabled: +if [ "${SETCAP:-yes}" = "yes" ]; then + # set realtime capabilities + echo "/sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/amsynth" >> $PKG/install/doinst.sh + # Only allow execution by audio group + chown root:audio $PKG/usr/bin/* + chmod 0750 $PKG/usr/bin/* +fi + cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |