diff --git a/speex/speex.SlackBuild b/speex/speex.SlackBuild index 41de507..063b4e4 100644 --- a/speex/speex.SlackBuild +++ b/speex/speex.SlackBuild @@ -2,8 +2,9 @@ # Slackware build script for speex -# Copyright (c) 2012 Vliegendehuiskat # Copyright (c) 2007 Alex Lysenka +# Copyright (c) 2012 Vliegendehuiskat +# Copyright (c) 2014-2015 Matteo Bernardini # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -24,12 +25,13 @@ # 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. -# Modified by SlackBuilds.org +# Modified by SlackBuilds.org # Modified by Willy Sudiarto Raharjo for CSB Project PRGNAM=speex -VERSION=${VERSION:-1.2rc1} +VERSION=${VERSION:-1.2rc2} +DSPVERSION=${DSPVERSION:-1.2rc3} BUILD=${BUILD:-1} TAG=${TAG:-_csb} @@ -41,7 +43,7 @@ if [ -z "$ARCH" ]; then esac fi -wget -c http://downloads.us.xiph.org/releases/speex/$PRGNAM-$VERSION.tar.gz +wget -c http://downloads.xiph.org/releases/speex/speex-1.2rc2.tar.gz http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz CWD=$(pwd) TMP=${TMP:-/tmp/csb} @@ -66,6 +68,35 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf ${PRGNAM}dsp-$DSPVERSION +tar xvf $CWD/${PRGNAM}dsp-$DSPVERSION.tar.gz +cd ${PRGNAM}dsp-$DSPVERSION +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 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION/dsp \ + --enable-static=no \ + --enable-sse \ + --build=$ARCH-slackware-linux + +# Hack to also make it look in the right directory on multilib systems +make LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" +make install DESTDIR=$PKG + +cp -a README* TODO $PKG/usr/doc/$PRGNAM-$VERSION/dsp +find $PKG/usr/doc -type f -exec chown root:root {} \; -exec chmod 644 {} \; + cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz @@ -75,34 +106,40 @@ 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 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Fix end-of-line encoding. +sed -i 's/\r//' README.TI-DSP CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ +SPEEXDSP_CFLAGS="-I$PKG/usr/include" \ +SPEEXDSP_LIBS="-L$PKG/usr/lib${LIBDIRSUFFIX} -lspeexdsp" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --enable-static=no \ + --enable-binaries \ --build=$ARCH-slackware-linux # Hack to also make it look in the right directory on multilib systems -make LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" +make LDFLAGS="-L/usr/lib${LIBDIRSUFFIX} -L$PKG/usr/lib${LIBDIRSUFFIX} -lspeexdsp" make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +find $PKG/usr/man -type f -exec gzip -9 '{}' \; -( 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 -) +# Fix libspeex.la +sed -i "s|-L$PKG.*/lib${LIBDIRSUFFIX} ||" $PKG/usr/lib${LIBDIRSUFFIX}/libspeex.la cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README* TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc -type f -exec chown root:root {} \; -exec chmod 644 {} \; +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc