diff options
author | Steve Pledger <spledger91@yahoo.com> | 2010-12-26 17:00:02 -0200 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2010-12-27 19:22:51 -0200 |
commit | f6791a8cc99406c76f01da7df1fce1538bfedb78 (patch) | |
tree | 2a300bdaae64df62cc2d18373d5c881791416cb9 /development | |
parent | 7d563b74b92a5ee7b8d63c4f0056dc5e76aa95a1 (diff) | |
download | slackbuilds-f6791a8cc99406c76f01da7df1fce1538bfedb78.tar.gz |
development/bacon: Test for correct VERSION + fix gcc options.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/bacon/bacon.SlackBuild | 42 | ||||
-rw-r--r-- | development/bacon/bacon.info | 6 |
2 files changed, 35 insertions, 13 deletions
diff --git a/development/bacon/bacon.SlackBuild b/development/bacon/bacon.SlackBuild index b59c38fcc2..f361c5ecc3 100644 --- a/development/bacon/bacon.SlackBuild +++ b/development/bacon/bacon.SlackBuild @@ -2,11 +2,18 @@ # Slackware build script for bacon -# Written by Steve Pledger spledger91@yahoo.com +# Written by Steve Pledger <spledger91@yahoo.com> + +# 2010-12-21 UPDATE: +# -Niels Horn suggested I display a warning if the internal +# version doesn't match the VERSION variable +# -According to the BaCon documentation, I'm supposed to use the '-o' +# switch for each compiler option. +# e.g. "-o -O2 -o -march=i486 -o -mtune=i686" instead of "-o -O2 -march=i486 -mtune=i686" PRGNAM="bacon" -VERSION="1.0_build_19" # Real version figured out below -BUILD=${BUILD:-1} +VERSION="${VERSION:-1.0_build_19}" +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -23,7 +30,20 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # Version number may change, so figure out the real version -REAL_VER="$(bash $CWD/bacon.bash -v | grep version | cut -d' ' -f3-5 | tr ' ' _)" +SRCVER="$(bash $CWD/bacon.bash -v | grep version | cut -d' ' -f3-5 | tr ' ' _)" + +if [ "$VERSION" != "$SRCVER" ]; then + cat <<EOF +WARNING: The source version ($SRCVER) does not match the VERSION variable ($VERSION). +To build anyway, re-run the SlackBuild like this: + + VERSION=$SRCVER ./$PRGNAM.SlackBuild + +exiting... +EOF + + exit 1 +fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -44,10 +64,10 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$REAL_VER -mkdir $PRGNAM-$REAL_VER +rm -rf $PRGNAM-$VERSION +mkdir $PRGNAM-$VERSION -cd $PRGNAM-$REAL_VER +cd $PRGNAM-$VERSION # Bacon creates a binary in the same location as the source, so copy the source file here. cat $CWD/bacon.bac > bacon.bac @@ -60,7 +80,7 @@ find . \ # Use the Bash version of BaCon to convert and compile the BASIC version, which is much faster. # (Note: Not using sh because this requires Bash 4.x and sh may be a symlink to another shell) -bash $CWD/bacon.bash -p -o "$SLKCFLAGS" bacon.bac +bash $CWD/bacon.bash -p -o $(echo $SLKCFLAGS | sed -e 's: : -o :g') bacon.bac mkdir -p $PKG/usr/bin install -m 0755 bacon $PKG/usr/bin @@ -68,11 +88,11 @@ install -m 0755 bacon $PKG/usr/bin find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -mkdir -p $PKG/usr/doc/$PRGNAM-$REAL_VER -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$REAL_VER/$PRGNAM.SlackBuild +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$REAL_VER-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/bacon/bacon.info b/development/bacon/bacon.info index f4c5533793..b58b5e0780 100644 --- a/development/bacon/bacon.info +++ b/development/bacon/bacon.info @@ -1,8 +1,10 @@ PRGNAM="bacon" VERSION="1.0_build_19" HOMEPAGE="http://www.basic-converter.org" -DOWNLOAD="http://www.basic-converter.org/bacon.bash http://www.basic-converter.org/bacon.bac" -MD5SUM="d60f0edfca5a46bf16fcb61e998156e0 571a6eb03b9c8df5a1cc283f729811e0" +DOWNLOAD="http://www.basic-converter.org/bacon.bash \ + http://www.basic-converter.org/bacon.bac" +MD5SUM="d60f0edfca5a46bf16fcb61e998156e0 \ + 571a6eb03b9c8df5a1cc283f729811e0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Steve Pledger" |