summaryrefslogtreecommitdiff
path: root/multimedia/faac/faac.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/faac/faac.SlackBuild')
-rw-r--r--multimedia/faac/faac.SlackBuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/multimedia/faac/faac.SlackBuild b/multimedia/faac/faac.SlackBuild
new file mode 100644
index 0000000000..b69bbad416
--- /dev/null
+++ b/multimedia/faac/faac.SlackBuild
@@ -0,0 +1,69 @@
+#!/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