summaryrefslogtreecommitdiff
path: root/academic/lalnview/lalnview.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/lalnview/lalnview.SlackBuild')
-rw-r--r--academic/lalnview/lalnview.SlackBuild40
1 files changed, 29 insertions, 11 deletions
diff --git a/academic/lalnview/lalnview.SlackBuild b/academic/lalnview/lalnview.SlackBuild
index 7b2f004dd3..1b25bcdb9d 100644
--- a/academic/lalnview/lalnview.SlackBuild
+++ b/academic/lalnview/lalnview.SlackBuild
@@ -1,16 +1,32 @@
#!/bin/sh
# Slackware build script for lalnview
-# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and
-# hereby submitted to the public domain
-# THIS SLACKBUILD IS DISTRIBUTETD IN THE HOPE OF BEING
-# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_
-# RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS CAUSED BY IT.
+# Copyright 2011 Petar Petrov, ppetrov@paju.oulu.fi
+# 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.
+
+# Thanks to Niels Horn for correcting the CFLAGS.
PRGNAM=lalnview
VERSION=${VERSION:-3.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -56,20 +72,22 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-OPT="$SLKCFLAGS" \
- make
-install -D -m755 lalnview $PKG/usr/bin/lalnview
+# Point to the correct place of lalnview.help
+sed -i "s:lalnview.help:/usr/doc/$PRGNAM-$VERSION/lalnview.help:" MF_MainWindow.cxx
+
+OPT="$SLKCFLAGS" make
+install -D -m755 lalnview $PKG/usr/bin/$PRGNAM
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Menu item and icon (couldn't find an icon, so i made one myself. I know it sucks.)
+# Couldn't find an icon, so i made one myself. I know it sucks.
mkdir -p $PKG/usr/share/{applications,pixmaps}
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications
cp $CWD/$PRGNAM.png $PKG/usr/share/pixmaps
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp lalnview.help $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a lalnview.help $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/References > $PKG/usr/doc/$PRGNAM-$VERSION/References