summaryrefslogtreecommitdiffstats
path: root/scons/build/scons.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2009-09-21 22:22:15 +0000
committer Eric Hameleers <alien@slackware.com>2009-09-21 22:22:15 +0000
commitff321d8697585652062ec0d5814b8536666224de (patch)
treeabfb8d37a55b2ca9e914c5f6f5a2a776ae7ad53d /scons/build/scons.SlackBuild
parent76db8c545abdeeab0070a58777480d92ddb1b2ae (diff)
downloadasb-ff321d8697585652062ec0d5814b8536666224de.tar.gz
asb-ff321d8697585652062ec0d5814b8536666224de.tar.xz
Update to 1.2.0 - cleanup the SlackBuild quite a bit
Diffstat (limited to '')
-rwxr-xr-xscons/build/scons.SlackBuild57
1 files changed, 12 insertions, 45 deletions
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 <alien@slackware.com>
+# 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 <alien@slackware.com>
# * Update. This is a candidate for scons 1.0
+# 1.2.0-1: 22/sep/2009 by Eric Hameleers <alien@slackware.com>
+# * 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