slackbuilds_ponce/audio/lv2file/lv2file.SlackBuild
B. Watson 2037ae7eee audio/lv2file: Added (apply lv2 plugins to audio files).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2014-02-11 12:15:07 -06:00

85 lines
2.1 KiB
Bash

#!/bin/sh
# Slackware build script for lv2file
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=lv2file
VERSION=${VERSION:-0.83}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
tar xvf $CWD/${PRGNAM}_$VERSION.orig.tar.gz
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# The argtable on SBo is too old to have a pkg-config .pc file, so patch
# the Makefile to not require it.
patch -p1 < $CWD/argtable.diff
if [ "${FORCE_SLACK_FLAGS:-no}" = "yes" ]; then
sed -i "s/-O3/$SLKCFLAGS/" Makefile
else
sed -i "s/-O3/-O3 -fPIC/" Makefile
fi
make
strip $PRGNAM
make install DESTDIR=$PKG
# Use the debian man page (which is actually by the lv2file author,
# I dunno why it's not in the lv2file source distrib to begin with)
tar xvf $CWD/${PRGNAM}_$VERSION-1.debian.tar.gz debian/$PRGNAM.1
mkdir -p $PKG/usr/man/man1
gzip -9c < debian/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
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}