summaryrefslogtreecommitdiffstats
path: root/graphics/feh/feh.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/feh/feh.SlackBuild')
-rw-r--r--graphics/feh/feh.SlackBuild28
1 files changed, 19 insertions, 9 deletions
diff --git a/graphics/feh/feh.SlackBuild b/graphics/feh/feh.SlackBuild
index f1f3ee8052..c6f03f7eb5 100644
--- a/graphics/feh/feh.SlackBuild
+++ b/graphics/feh/feh.SlackBuild
@@ -1,11 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for feh
# Copyright 2006-2009 Chess Griffin <chess@chessgriffin.com>
# Copyright 2011-2012 Grigorios Bouzakis <grbzks@imap.cc>
# Copyright 2014-2015 Luka Novsak <lnovsak@gmail.com>
-# Copyright 2017-2019 Hunter Sezen <orbea@riseup.net>
+# Copyright 2017-2021 Hunter Sezen <orbea@riseup.net>
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for any purpose
@@ -23,10 +23,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=feh
-VERSION=${VERSION:-3.2.1}
+VERSION=${VERSION:-3.6.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,10 +81,10 @@ 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 {} \;
-[ "${EXIF:=0}" != 0 ] && EXIF=1
-[ "${HELP:=0}" != 0 ] && HELP=1
-[ "${INOTIFY:=0}" != 0 ] && INOTIFY=1
-[ "${STAT64:=0}" != 0 ] && STAT64=1
+[ "${EXIF:=0}" = 0 ] || EXIF=1
+[ "${HELP:=0}" = 0 ] || HELP=1
+[ "${INOTIFY:=0}" = 0 ] || INOTIFY=1
+[ "${STAT64:=0}" = 0 ] || STAT64=1
CFLAGS="$SLKCFLAGS" \
make \
@@ -106,4 +116,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE