#!/bin/sh # Slackware build script for faac # Written by core (eroc@linuxmail.org) # Mofified for version 1.26 by Robby Workman # Thanks to Carpo on LinuxQuestions.org for the tips set -e PRGNAM=faac VERSION=1.26 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} 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 rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz mv $PRGNAM $PRGNAM-$VERSION cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . # Generate configure script ./bootstrap CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --mandir=/usr/man \ --enable-shared=yes \ --enable-static=no \ --with-mp4v2 make make install-strip DESTDIR=$PKG if [ -d $PKG/usr/man ]; then ( 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 ) fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README TODO docs/* \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; 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