summaryrefslogtreecommitdiffstats
path: root/audio/faac/faac.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/faac/faac.SlackBuild')
-rw-r--r--audio/faac/faac.SlackBuild29
1 files changed, 21 insertions, 8 deletions
diff --git a/audio/faac/faac.SlackBuild b/audio/faac/faac.SlackBuild
index 36e0930a1e..82681ebb53 100644
--- a/audio/faac/faac.SlackBuild
+++ b/audio/faac/faac.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for faac
@@ -26,10 +26,15 @@
# Thanks to Heinz Wiesinger for the information about faac and libmp4v2
# Updated to newer version by Niklas "Nille" Åkerström and also new maintainer.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=faac
VERSION=${VERSION:-1.30}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCVER=${VERSION/./_}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,7 +44,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -63,10 +75,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
-mv $PRGNAM-$(echo $VERSION | tr . _ ) $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
+cd $PRGNAM-$SRCVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -100,8 +111,10 @@ cp -a AUTHORS ChangeLog COPYING NEWS README TODO docs/*.{html,pdf} \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/lib*/*.la
+
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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE