summaryrefslogtreecommitdiff
path: root/misc/lppf/lppf.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/lppf/lppf.SlackBuild')
-rw-r--r--misc/lppf/lppf.SlackBuild16
1 files changed, 7 insertions, 9 deletions
diff --git a/misc/lppf/lppf.SlackBuild b/misc/lppf/lppf.SlackBuild
index 7ee052bde5..f5cdc565bd 100644
--- a/misc/lppf/lppf.SlackBuild
+++ b/misc/lppf/lppf.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for lppf
-# Copyright 2016 Hunter Sezen California, USA
+# Copyright 2016, 2018 Hunter Sezen California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -55,12 +55,7 @@ else
LIBDIRSUFFIX=""
fi
-DEBUG=${DEBUG:-0}
-if [ "$DEBUG" = "1" ]; then
- SLKCFLAGS=$(echo $SLKCFLAGS | sed 's/-O2/-O0 -g/')
-fi
-
-set -e
+set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -75,17 +70,20 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+[ "${DEBUG:=0}" != 0 ] && \
+ SLKCFLAGS="$(printf %s "$SLKCFLAGS" | sed 's/-O2/-O0 -g/')"
+
zcat $CWD/Makefile.diff.gz | patch -p1
zcat $CWD/braces.diff.gz | patch -p1
-CFLAGS="$SLKCFLAGS" make
+make CFLAGS="$SLKCFLAGS"
make install \
PREFIX=/usr \
DOCDIR=/usr/doc/$PRGNAM-$VERSION \
DESTDIR=$PKG
-if [ "$DEBUG" = "0" ]; then
+if [ "$DEBUG" = 0 ]; then
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
fi