aboutsummaryrefslogtreecommitdiff
path: root/system/nbench/nbench.SlackBuild
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2011-12-12 21:34:00 -0600
committerNiels Horn <niels.horn@slackbuilds.org>2011-12-18 00:07:47 -0200
commit11302d0f2c489542fe9952af5eadab13a2a4e620 (patch)
tree7f0a2d999344b4301875bb496b8118e817b43e69 /system/nbench/nbench.SlackBuild
parent7ebc1de42aec2506f674636092f248520941b4ca (diff)
system/nbench: Miscellaneous script cleanup
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
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 db7b4bb193df..95ddf766efda 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}
-
-