aboutsummaryrefslogtreecommitdiff
path: root/system/lbench/lbench.SlackBuild
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2011-12-28 14:11:36 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-12-31 00:24:41 -0600
commitcdc48a6c2a87765c16f1d387037093dd5be56b9b (patch)
tree5d49ffdf02489d488d022ee2a77a59eb73d07a77 /system/lbench/lbench.SlackBuild
parentc7ddeb6acc238f2af4c7f9c5cc57ac8a2a87e653 (diff)
system/lbench: Updated for version 1.7
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'system/lbench/lbench.SlackBuild')
-rw-r--r--system/lbench/lbench.SlackBuild41
1 files changed, 33 insertions, 8 deletions
diff --git a/system/lbench/lbench.SlackBuild b/system/lbench/lbench.SlackBuild
index 0cebcd543abbb..c03722cd6fc3c 100644
--- a/system/lbench/lbench.SlackBuild
+++ b/system/lbench/lbench.SlackBuild
@@ -3,11 +3,30 @@
# Slackware build script for lbench
# simple Linux multithread benchmarking tool
-# Written by Niels Horn <niels.horn@gmail.com>
-# Revision date 2010/12/23
+# 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/28
PRGNAM=lbench
-VERSION=${VERSION:-1.6}
+VERSION=${VERSION:-1.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -53,12 +72,19 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix makefile to not "install" the .desktop file
+sed -i "s/xdg-desktop/# xdg-desktop/g" Makefile
+
CXXFLAGS="$SLKCFLAGS" \
PREFIX=/usr \
-make DOCDIR=/usr/doc/$PRGNAM-$VERSION
+make
PREFIX=/usr \
-make install DOCDIR=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG
+make install \
+ DOCDIR=/usr/doc/$PRGNAM-$VERSION \
+ MANDIR=/usr/man/man1 \
+ MENUFILE=/usr/share/applications/$PRGNAM.desktop \
+ DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -68,9 +94,8 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/share/{applications,pixmaps}
cat desktop | \
- sed -e "s|/usr/local/bin/lbench|lbench|" \
- -e "s|/usr/local/share/lbench/icons/lbench.png|lbench|" \
- -e "s|^# ||g" \
+ sed -e "s|/usr/bin/lbench|lbench|" \
+ -e "s|/usr/share/lbench/icons/lbench.png|lbench|" \
> $PKG/usr/share/applications/$PRGNAM.desktop
cp icons/$PRGNAM.png $PKG/usr/share/pixmaps/