2010-05-11 14:56:21 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for libsamplerate 0.1.2
|
|
|
|
# Written by paul wisehart wise@lupulin.net
|
2010-05-11 19:45:19 +02:00
|
|
|
# Modified by Robby Workman <rworkman@slackbuilds.org>
|
2010-05-11 14:56:21 +02:00
|
|
|
|
|
|
|
PRGNAM=libsamplerate
|
|
|
|
VERSION=0.1.2
|
|
|
|
ARCH=${ARCH:-i486}
|
2010-05-11 19:45:19 +02:00
|
|
|
BUILD=${BUILD:-3}
|
2010-05-11 14:56:21 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2010-05-11 19:45:19 +02:00
|
|
|
|
2010-05-11 14:56:21 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
|
|
|
fi
|
|
|
|
|
2010-05-11 19:45:19 +02:00
|
|
|
set -e # Exit on most errors
|
|
|
|
|
2010-05-11 14:56:21 +02:00
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
2010-05-11 19:45:19 +02:00
|
|
|
cd $TMP
|
2010-05-11 14:56:21 +02:00
|
|
|
rm -rf $PRGNAM-$VERSION
|
2010-05-11 19:45:19 +02:00
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
|
|
|
cd $PRGNAM-$VERSION
|
2010-05-11 14:56:21 +02:00
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
2010-05-11 19:45:19 +02:00
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--disable-static \
|
|
|
|
--localstatedir=/var
|
2010-05-11 14:56:21 +02:00
|
|
|
|
2010-05-11 19:45:19 +02:00
|
|
|
make
|
|
|
|
make install DESTDIR=$PKG
|
2010-05-11 14:56:21 +02:00
|
|
|
|
|
|
|
( cd $PKG
|
|
|
|
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
|
|
|
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
|
|
|
)
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a COPYING README doc/* $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.tgz
|