2010-05-11 22:38:32 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for flite
|
|
|
|
# Written by Martin Lefebvre (dadexter@sekurity.com)
|
|
|
|
|
|
|
|
PRGNAM=flite
|
|
|
|
VERSION=1.3
|
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
2010-05-13 00:20:32 +02:00
|
|
|
|
2010-06-04 06:59:33 +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
|
|
|
|
|
2010-05-11 22:38:32 +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"
|
2010-05-13 00:20:32 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 22:38:32 +02:00
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
2010-05-13 00:20:32 +02:00
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
|
|
SLKCFLAGS="-O2 -fPIC"
|
|
|
|
LIBDIRSUFFIX="64"
|
2010-06-04 06:59:33 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 22:38:32 +02:00
|
|
|
fi
|
|
|
|
|
2010-05-13 00:20:32 +02:00
|
|
|
set -e
|
|
|
|
|
2010-05-11 22:38:32 +02:00
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION-release
|
2010-05-13 00:20:32 +02:00
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION-release.tar.gz
|
2010-05-11 22:38:32 +02:00
|
|
|
cd $PRGNAM-$VERSION-release
|
2010-05-13 00:20:32 +02:00
|
|
|
chown -R root:root .
|
2010-05-11 22:38:32 +02:00
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
2010-05-13 00:20:32 +02:00
|
|
|
patch -p1 < $CWD/flite-1.3-install_libs.diff
|
|
|
|
|
2010-05-11 22:38:32 +02:00
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2010-05-13 00:20:32 +02:00
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
2010-05-11 22:38:32 +02:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
2010-05-13 00:20:32 +02:00
|
|
|
--with-vox=cmu_us_kal16 \
|
|
|
|
--build=$ARCH-slackware-linux
|
2010-05-11 22:38:32 +02:00
|
|
|
|
|
|
|
make
|
2010-05-13 00:20:32 +02:00
|
|
|
make install prefix=$PKG/usr INSTALLLIBDIR=$PKG/usr/lib${LIBDIRSUFFIX}
|
2010-05-11 22:38:32 +02:00
|
|
|
|
2010-05-19 08:30:57 +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
|
2010-05-11 22:38:32 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a ACKNOWLEDGEMENTS COPYING README doc/* $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
2010-05-13 00:20:32 +02:00
|
|
|
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/Makefile*
|
2010-05-11 22:38:32 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:20:32 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|