diff options
author | Eric Hameleers <alien@slackware.com> | 2009-01-08 15:50:15 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2009-01-08 15:50:15 +0000 |
commit | 371b0aca57a8f3dd7374cb6dc67834b44df89b82 (patch) | |
tree | 882b6259829045f8bd16e579cc0afca487faedbd | |
parent | cb7f1dc2f54e7833eed778b1f86570324ac18bca (diff) | |
download | asb-371b0aca57a8f3dd7374cb6dc67834b44df89b82.tar.gz asb-371b0aca57a8f3dd7374cb6dc67834b44df89b82.tar.xz |
Small updates to the script
-rwxr-xr-x | xaudio/build/xaudio.SlackBuild | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/xaudio/build/xaudio.SlackBuild b/xaudio/build/xaudio.SlackBuild index 645686da..730344fb 100755 --- a/xaudio/build/xaudio.SlackBuild +++ b/xaudio/build/xaudio.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2008 Eric Hameleers <alien@slackware.com> +# Copyright (c) 2008, 2009 Eric Hameleers, Eindhoven, Netherlands # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -33,7 +33,7 @@ # 0.6.1-1: 01/Jul/2008 by Eric Hameleers <alien@slackware.com> # * Initial build. # -# Run 'sh xaudio.SlackBuild --cleanup' to build a Slackware package. +# Run 'sh xaudio.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # @@ -71,15 +71,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" @@ -135,11 +128,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} # Add DESTDIR support to the Makefile: cat $SRCDIR/xaudio_destdir.patch | patch -p0 \ @@ -188,7 +177,11 @@ EOINS # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $SRCDIR/$(basename $0) | sed \ + -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \ + -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \ + -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \ + > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; @@ -199,10 +192,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 # Add a package description: mkdir -p $PKG/install @@ -216,8 +207,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 |