From e6e28e70ce7ae3bb6f7f053dc81fc0fb11c779b8 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 30 Jan 2010 21:53:14 +0000 Subject: Updated for Slackware 13 --- a52dec/build/a52dec.SlackBuild | 46 ++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/a52dec/build/a52dec.SlackBuild b/a52dec/build/a52dec.SlackBuild index 490195c3..5cef9bb0 100755 --- a/a52dec/build/a52dec.SlackBuild +++ b/a52dec/build/a52dec.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2009 Eric Hameleers +# Copyright (c) 2009,2010 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -32,6 +32,8 @@ # Changelog: # 0.7.4-1: 19/May/2009 by Eric Hameleers # * Initial build. +# 0.7.4-2: 30/Jan/2010 by Eric Hameleers +# * Re-build for Slackware 13. # # Run 'sh a52dec.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -43,8 +45,7 @@ PRGNAM=a52dec VERSION=${VERSION:-0.7.4} -ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} @@ -65,31 +66,35 @@ SRCURL="http://liba52.sourceforge.net/files/${PRGNAM}-${VERSION}.tar.gz" ## --- with a little luck, you won't have to edit below this point --- ## ## -# Exit the script on errors: -set -e -trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR -# Catch unitialized variables: -set -u -P1=${1:-1} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi case "$ARCH" in i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; - s390) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - powerpc) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; - athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" + *) SLKCFLAGS="-O2" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; esac +# Exit the script on errors: +set -e +trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR +# Catch unitialized variables: +set -u +P1=${1:-1} + # Create working directories: mkdir -p $OUTPUT # place for the package to be saved mkdir -p $TMP/tmp-$PRGNAM # location to build the source @@ -154,14 +159,7 @@ CFLAGS="$SLKCFLAGS" \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log -# Install all the needed stuff to the package dir -# Use installwatch if available, to produce a logfile of the installation -# process that is more easily readable: -if $(which installwatch > /dev/null 2>&1); then - installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install -else - make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log -fi +make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -- cgit v1.2.3-65-gdbad