summaryrefslogtreecommitdiffstats
path: root/lame
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-01-30 22:14:13 +0000
committer Eric Hameleers <alien@slackware.com>2010-01-30 22:14:13 +0000
commit065a8a20486df29119a3ee56d8cdafd25b268195 (patch)
tree87a547526fa91cbaed39d829dea218fe4a1a79ab /lame
parent13d4f473ddee81392aae7611cc94191287827dad (diff)
downloadasb-065a8a20486df29119a3ee56d8cdafd25b268195.tar.gz
asb-065a8a20486df29119a3ee56d8cdafd25b268195.tar.xz
Updated for Slackware 13
Diffstat (limited to 'lame')
-rwxr-xr-xlame/build/lame.SlackBuild90
1 files changed, 36 insertions, 54 deletions
diff --git a/lame/build/lame.SlackBuild b/lame/build/lame.SlackBuild
index e7f842d6..2f66b74e 100755
--- a/lame/build/lame.SlackBuild
+++ b/lame/build/lame.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2005-2008 Eric Hameleers <alien@slackware.com>
+# Copyright (c) 2005-2010 Eric Hameleers, Eeeeindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,8 +36,10 @@
# * Update.
# 3.98.2-1: 24/sep/2008 by Eric Hameleers <alien@slackware.com>
# * New stable release.
+# 3.98.2-2: 30/jan/2010 by Eric Hameleers <alien@slackware.com>
+# * Rebuild.
#
-# Run 'sh lame.SlackBuild --cleanup' to build a Slackware package.
+# Run 'sh lame.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
@@ -48,8 +50,7 @@
PRGNAM=lame
VERSION=${VERSION:-3.98.2}
SRCVER=${SRCVER:-398-2}
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-alien}
DOCS="API COPYING ChangeLog* DEFINES HACKING LICENSE README* STYLEGUIDE TODO"
@@ -76,27 +77,24 @@ trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
set -u
P1=${1:-1}
-# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
- MOPT=tune
-else
- MOPT=cpu
+# 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 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- s390) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- powerpc) SLKCFLAGS="-O2"
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
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
@@ -141,11 +139,7 @@ echo "++"
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
-if $(file ${SOURCE} | grep -q ": bzip2"); then
- tar -xjvf ${SOURCE}
-elif $(file ${SOURCE} | grep -q ": gzip"); then
- tar -xzvf ${SOURCE}
-fi
+tar -xvf ${SOURCE}
mv ${PRGNAM}-${SRCVER} ${PRGNAM}-${VERSION}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
@@ -155,32 +149,27 @@ echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --enable-nasm \
- --enable-shared \
- --enable-static \
- --enable-decode-layer1 \
- --enable-mp3x \
- --enable-mp3rtp \
- --program-prefix="" \
- --program-suffix="" \
- --build=$ARCH-slackware-linux \
- 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
- # Spits errors now (was OK in 3.97): --enable-mp3rtp \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --enable-nasm \
+ --enable-shared \
+ --enable-static \
+ --enable-decode-layer1 \
+ --enable-mp3x \
+ --enable-mp3rtp \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+ # Spits errors now (was OK in 3.97): --enable-mp3rtp \
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
@@ -197,10 +186,8 @@ if [ -d $PKG/usr/man ]; then
fi
# Strip binaries:
-cd $PKG
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-cd -
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Add a package description:
mkdir -p $PKG/install
@@ -214,8 +201,3 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
-# Clean up the extra stuff:
-if [ "$P1" = "--cleanup" ]; then
- rm -rf $TMP/tmp-$PRGNAM
- rm -rf $PKG
-fi