#!/bin/sh # # Slackware build script for mp3blaster # BuildRequires: # Distribution: Slackware Linux 11.0 # Packager baldelario ~at~ gmail ~dot~ com # http://www.slacky.it # Source location: http://mp3blaster.sourceforge.net/ CWD=`pwd` if ["$TMP" = ""]; then TMP=/tmp fi PKG=$TMP/package-mp3blaster NAME=mp3blaster VERSION=${VERSION:-3.2.3} TARGET=i486 ARCH=${ARCH:-i486} BUILD=${BUILD:-2}bj # If GCC version is 3.3.x, then use -mcpu; otherwise use -mtune if [ x`gcc --version | grep GCC | awk '{print $3}' | cut -c 1-3` = x3.3 ]; then GCCFLAG=mcpu else GCCFLAG=mtune fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -${GCCFLAG}=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -${GCCFLAG}=i686" elif [ "$ARCH" = "iP4" ]; then SLKCFLAGS="-march=pentium4 -mfpmath=sse -${GCCFLAG}=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi echo "| Start SlackBuild $NAME-$VERSION |" cd $TMP rm -rf $NAME-$VERSION tar xzvf $CWD/$NAME-$VERSION.tar.gz cd $NAME-$VERSION chown -R root:root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --mandir=/usr/man \ --program-prefix="" \ --program-suffix="" \ $TARGET-slackware-linux make make install DESTDIR=$PKG strip $PKG/usr/bin/* mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a AUTHORS BUGS COPYING CREDITS FAQ INSTALL NEWS README TODO \ $PKG/usr/doc/$NAME-$VERSION gzip -9 $PKG/usr/man/man1/* mkdir $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild cd $PKG requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$NAME-$VERSION rm -rf $PKG fi