slackbuilds_ponce/audio/pd/pd.SlackBuild

86 lines
2.1 KiB
Text
Raw Normal View History

#!/bin/sh
# Slackware build script for Pure Data
# Written by ilya .d <errordeveloper-AT-gmail-DOT-com>
# Modified by Robby Workman <rworkman@slackbuilds.org> with minor stuff:
# -fix makefile patch to use DESTDIR correctly
# -miscellanous script tweaks
# No additional license terms
PRGNAM=pd
2010-05-12 17:37:17 +02:00
SRC_VERSION=0.42-4
VERSION=$(echo $SRC_VERSION | tr - .)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
2010-05-13 00:21:57 +02:00
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) 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"
2010-05-13 00:21:57 +02:00
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
2010-05-13 00:21:57 +02:00
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
tar xvf $CWD/$PRGNAM-$SRC_VERSION.src.tar.gz
cd $PRGNAM-$SRC_VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
cd src
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
2010-05-13 00:21:57 +02:00
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--datadir=/usr/share/pd \
--localstatedir=/var \
--enable-alsa \
--enable-setuid
make
2010-05-13 00:21:57 +02:00
make install DESTDIR=$PKG
cd -
2010-05-19 08:31:24 +02:00
find $PKG | xargs 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 INSTALL.txt README.txt LICENSE.txt src/CHANGELOG.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
2010-05-12 17:37:17 +02:00
ln -s /usr/lib/pd/doc/ $PKG/usr/doc/$PRGNAM-$VERSION/docs
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
2010-05-13 00:21:57 +02:00
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}