aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/nbench/README5
-rw-r--r--system/nbench/cflags.patch11
-rw-r--r--system/nbench/nbench.SlackBuild94
-rw-r--r--system/nbench/nbench.info10
-rw-r--r--system/nbench/slack-desc19
5 files changed, 139 insertions, 0 deletions
diff --git a/system/nbench/README b/system/nbench/README
new file mode 100644
index 0000000000000..50337a22cad8a
--- /dev/null
+++ b/system/nbench/README
@@ -0,0 +1,5 @@
+These are Native Mode (a.k.a. Algorithm Level) tests; benchmarks designed to
+expose the capabilities of a system's CPU, FPU, and memory system.
+
+This can be compiled on various operating systems, including SunOS,
+DEC Unix 4.0, DEC OSF1, HP-UX, DEC Ultrix, MS-DOS, and of course Linux.
diff --git a/system/nbench/cflags.patch b/system/nbench/cflags.patch
new file mode 100644
index 0000000000000..3c3fc026e0c7a
--- /dev/null
+++ b/system/nbench/cflags.patch
@@ -0,0 +1,11 @@
+--- nbench-byte-2.2.3_orig/Makefile 2004-12-30 00:23:30.000000000 -0200
++++ nbench-byte-2.2.3/Makefile 2010-02-15 13:05:24.000000000 -0200
+@@ -22,7 +22,7 @@
+ CC = gcc
+
+ # generic options for gcc
+-CFLAGS = -s -static -Wall -O3
++CFLAGS = -s -static -Wall -O3 @XTRACFLAGS@
+
+ # if your gcc lets you do it, then try this one
+ #CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
diff --git a/system/nbench/nbench.SlackBuild b/system/nbench/nbench.SlackBuild
new file mode 100644
index 0000000000000..6852aff09d1d7
--- /dev/null
+++ b/system/nbench/nbench.SlackBuild
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+# Slackware build script for nbench
+
+# Written by Niels Horn <niels.horn@gmail.com>
+# Revision date: 2010-02-15
+
+PRGNAM=nbench
+VERSION=${VERSION:-2.2.3}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCVERSION="byte-$VERSION"
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390x" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVERSION
+tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
+cd $PRGNAM-$SRCVERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -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
+
+# Since pointer.h is created by the Makefile, we cannot use anything better
+# than -j1
+make -j1
+
+strip --strip-unneeded nbench
+
+# "Install" manually
+mkdir -p $PKG/usr/bin
+cp $PRGNAM $PKG/usr/bin/${PRGNAM}_bin
+mkdir -p $PKG/usr/share/$PRGNAM
+cp NNET.DAT $PKG/usr/share/$PRGNAM/
+
+# nbench expects NNET in current directory, so we'll create a small script to
+# go to the data directory and start the binary from there
+cat > $PKG/usr/bin/$PRGNAM << EOF
+#!/bin/sh
+cd /usr/share/$PRGNAM
+${PRGNAM}_bin
+EOF
+chmod +x $PKG/usr/bin/$PRGNAM
+
+# Copy program documentation into the package
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ Changes README* RESULTS bdoc.txt \
+ $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-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
+
diff --git a/system/nbench/nbench.info b/system/nbench/nbench.info
new file mode 100644
index 0000000000000..6e35c644709d5
--- /dev/null
+++ b/system/nbench/nbench.info
@@ -0,0 +1,10 @@
+PRGNAM="nbench"
+VERSION="2.2.3"
+HOMEPAGE="http://www.tux.org/~mayer/linux/bmark.html"
+DOWNLOAD="http://www.tux.org/~mayer/linux/nbench-byte-2.2.3.tar.gz"
+MD5SUM="285dfab361080759d477ea1fe7d3093a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="dsomero"
diff --git a/system/nbench/slack-desc b/system/nbench/slack-desc
new file mode 100644
index 0000000000000..720470e332d41
--- /dev/null
+++ b/system/nbench/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+nbench: nbench (BYTE's Native Mode Benchmarks)
+nbench:
+nbench: These are Native Mode (a.k.a. Algorithm Level) tests; benchmarks
+nbench: designed to expose the capabilities of a system's CPU, FPU, and
+nbench: memory system.
+nbench:
+nbench: http://www.tux.org/~mayer/linux/bmark.html
+nbench:
+nbench:
+nbench:
+nbench: