2010-05-11 15:00:30 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-05-11 19:45:43 +02:00
|
|
|
# Slackware build script for speex
|
2010-05-12 17:37:24 +02:00
|
|
|
|
2010-05-11 19:45:43 +02:00
|
|
|
# Copyright (c) 2007 Alex Lysenka <me@alkos333.net>
|
2010-05-11 15:00:30 +02:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
2010-05-11 19:45:43 +02:00
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are
|
|
|
|
# met:
|
2010-05-11 15:00:30 +02:00
|
|
|
#
|
2010-05-11 19:45:43 +02:00
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
2010-05-11 15:00:30 +02:00
|
|
|
#
|
2010-05-11 19:45:43 +02:00
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2010-05-11 20:30:56 +02:00
|
|
|
# Modified by SlackBuilds.org
|
2010-05-11 15:00:30 +02:00
|
|
|
|
|
|
|
PRGNAM=speex
|
2010-05-11 20:30:56 +02:00
|
|
|
VERSION=1.2rc1
|
2010-05-11 15:00:30 +02:00
|
|
|
ARCH=${ARCH:-i486}
|
2010-05-12 17:37:24 +02:00
|
|
|
BUILD=${BUILD:-2}
|
2010-05-11 15:00:30 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2010-05-11 20:30:56 +02:00
|
|
|
|
2010-05-11 15:00:30 +02:00
|
|
|
CWD=$( pwd )
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
2010-05-11 20:30:56 +02:00
|
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
2010-05-12 17:37:24 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 15:00:30 +02:00
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
2010-05-11 20:30:56 +02:00
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
2010-05-12 17:37:24 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 20:30:56 +02:00
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
|
|
SLKCFLAGS="-O2 -fPIC"
|
2010-05-12 17:37:24 +02:00
|
|
|
LIBDIRSUFFIX="64"
|
2010-05-11 15:00:30 +02:00
|
|
|
fi
|
|
|
|
|
2010-05-11 20:30:56 +02:00
|
|
|
set -e
|
|
|
|
|
2010-05-11 15:00:30 +02:00
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
2010-05-12 17:37:24 +02:00
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
2010-05-11 15:00:30 +02:00
|
|
|
cd $PRGNAM-$VERSION
|
2010-05-11 20:30:56 +02:00
|
|
|
chown -R root:root .
|
2010-05-11 15:00:30 +02:00
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2010-05-12 17:37:24 +02:00
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
2010-05-11 15:00:30 +02:00
|
|
|
--enable-static=no \
|
2010-05-12 17:37:24 +02:00
|
|
|
--build=$ARCH-slackware-linux
|
2010-05-11 15:00:30 +02:00
|
|
|
|
2010-05-11 20:30:56 +02:00
|
|
|
make
|
2010-05-12 17:37:24 +02:00
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
2010-05-19 08:31:31 +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 15:00:30 +02:00
|
|
|
|
2010-05-12 17:37:24 +02:00
|
|
|
( cd $PKG/usr/man
|
|
|
|
find . -type f -exec gzip -9 {} \;
|
|
|
|
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
|
|
|
|
)
|
2010-05-11 15:00:30 +02:00
|
|
|
|
2010-05-12 17:37:24 +02:00
|
|
|
cp -a \
|
|
|
|
AUTHORS COPYING ChangeLog INSTALL NEWS README* TODO \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
2010-05-11 15:00:30 +02:00
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
find $PKG/usr/doc -type f -exec chown root:root {} \; -exec chmod 644 {} \;
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:22:08 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|