summaryrefslogtreecommitdiffstats
path: root/system/nbench/nbench.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/nbench/nbench.SlackBuild')
-rw-r--r--system/nbench/nbench.SlackBuild43
1 files changed, 28 insertions, 15 deletions
diff --git a/system/nbench/nbench.SlackBuild b/system/nbench/nbench.SlackBuild
index db7b4bb193..95ddf766ef 100644
--- a/system/nbench/nbench.SlackBuild
+++ b/system/nbench/nbench.SlackBuild
@@ -2,21 +2,38 @@
# Slackware build script for nbench
-# Written by Niels Horn <niels.horn@gmail.com>
-# Revision date: 2010-02-15
+# Copyright 2010-2011 Niels Horn, Rio de Janeiro, RJ, Brazil
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Revision date: 2011/12/09
PRGNAM=nbench
VERSION=${VERSION:-2.2.3}
SRCVERSION="byte-$VERSION"
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -55,13 +72,12 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# "Configure" manually altering the Makefile
-patch -p1 < $CWD/cflags.patch
-sed -i "s/@XTRACFLAGS@/$SLKCFLAGS/" Makefile
+# Patch makefile to accept our CFLAGS + resolve pointer problem
+# Source: http://www.tux.org/~mayer/linux/gcc-4.3.3.txt
+patch -p1 < $CWD/nbench_cflags_pointer.patch
-# Since pointer.h is created by the Makefile, we cannot use anything better
-# than -j1
-make -j1
+CFLAGS=$SLKCFLAGS \
+ make
strip --strip-unneeded nbench
@@ -78,9 +94,8 @@ cat > $PKG/usr/bin/$PRGNAM << EOF
cd /usr/share/$PRGNAM
${PRGNAM}_bin
EOF
-chmod +x $PKG/usr/bin/$PRGNAM
+chmod 0755 $PKG/usr/bin/$PRGNAM
-# Copy program documentation into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
Changes README* RESULTS bdoc.txt \
@@ -92,5 +107,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
-
-