summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2009-05-28 20:19:27 +0000
committer Eric Hameleers <alien@slackware.com>2009-05-28 20:19:27 +0000
commit4430b521573d2867ba2c3e69d125ff1f9c574d34 (patch)
treec46dce99039aa50538b7c764fb07099183fc24f1
parent06d0be17443c2997a645ec7e7c408cb45dbc157f (diff)
downloadasb-4430b521573d2867ba2c3e69d125ff1f9c574d34.tar.gz
asb-4430b521573d2867ba2c3e69d125ff1f9c574d34.tar.xz
Polished the SlackBuild a bit
-rwxr-xr-xSDL_sound/build/SDL_sound.SlackBuild43
1 files changed, 14 insertions, 29 deletions
diff --git a/SDL_sound/build/SDL_sound.SlackBuild b/SDL_sound/build/SDL_sound.SlackBuild
index 28351c41..f59d5011 100755
--- a/SDL_sound/build/SDL_sound.SlackBuild
+++ b/SDL_sound/build/SDL_sound.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2007-2008 Eric Hameleers <alien@slackware.com>
+# Copyright 2007-2009 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,7 +36,7 @@
# 1.0.3-1: 23/may/2008 by Eric Hameleers <alien@slackware.com>
# * Update
#
-# Run 'sh SDL_sound.SlackBuild --cleanup' to build a Slackware package.
+# Run 'sh SDL_sound.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
@@ -74,15 +74,8 @@ 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
-fi
-
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
s390) SLKCFLAGS="-O2"
@@ -138,11 +131,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}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -151,20 +140,21 @@ echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --program-prefix="" \
- --program-suffix="" \
- --build=$ARCH-slackware-linux \
- 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux \
+ 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
+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
@@ -200,8 +190,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