From ff321d8697585652062ec0d5814b8536666224de Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 21 Sep 2009 22:22:15 +0000 Subject: Update to 1.2.0 - cleanup the SlackBuild quite a bit --- scons/build/scons.SlackBuild | 57 ++++++++++---------------------------------- 1 file changed, 12 insertions(+), 45 deletions(-) (limited to 'scons/build/scons.SlackBuild') diff --git a/scons/build/scons.SlackBuild b/scons/build/scons.SlackBuild index cac54fab..f3c8a1a7 100755 --- a/scons/build/scons.SlackBuild +++ b/scons/build/scons.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2007-2008 Eric Hameleers +# Copyright (c) 2007-2009 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -34,8 +34,10 @@ # * Initial build. # 0.98.4-1: 22/may/2008 by Eric Hameleers # * Update. This is a candidate for scons 1.0 +# 1.2.0-1: 22/sep/2009 by Eric Hameleers +# * Update. # -# Run 'sh scons.SlackBuild --cleanup' to build a Slackware package. +# Run 'sh scons.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # @@ -44,7 +46,7 @@ # Set initial variables: PRGNAM=scons -VERSION=${VERSION:-0.98.4} +VERSION=${VERSION:-1.2.0} ARCH=noarch BUILD=${BUILD:-1} TAG=${TAG:-alien} @@ -73,31 +75,6 @@ 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" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - s390) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - powerpc) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - x86_64) SLKCFLAGS="-O2 -fPIC" - SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" - ;; - athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; -esac - # Create working directories: mkdir -p $TMP/tmp-$PRGNAM # location to build the source rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build @@ -137,11 +114,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 . @@ -155,7 +128,12 @@ python ./setup.py install --root=$PKG --symlink-scons \ # 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 {} \; # Compress the man page(s): @@ -164,12 +142,6 @@ if [ -d $PKG/usr/man ]; then for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done 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 - - # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc @@ -182,8 +154,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 -- cgit v1.2.3-65-gdbad