summaryrefslogtreecommitdiffstats
path: root/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild')
-rw-r--r--desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild49
1 files changed, 26 insertions, 23 deletions
diff --git a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild
index 5f8d5e70c2..8ddbfbecda 100644
--- a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild
+++ b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild
@@ -1,23 +1,22 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for j4-dmenu-desktop
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
-# 20180112 bkw:
-# - Update for 2.16 release.
+# 20201103 bkw: update for 2.18 release
+# 20191128 bkw:
+# - Update for 2.17 release.
+# - Upstream now includes the man page in the tarball, use that
+# instead the old one that used to be here. Means this script can't
+# build older versions.
-# 20170301 bkw:
-# - Update for 2.15 release.
-# - Use github long-form URL.
-
-# 20160726 bkw:
-# - Update for 2.14 release.
-
-# 20150914 bkw:
-# - Update for 2.13 release.
+# 20180112 bkw: Update for 2.16 release.
+# 20170301 bkw: Update for 2.15 release, use github long-form URL.
+# 20160726 bkw: Update for 2.14 release.
+# 20150914 bkw: Update for 2.13 release.
# 20150512 bkw:
# - Update for 2.12 release.
@@ -36,10 +35,13 @@
# - Added man page
# - Added default terminal selection
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=j4-dmenu-desktop
-VERSION=${VERSION:-2.16}
+VERSION=${VERSION:-2.18}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -49,7 +51,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
@@ -77,11 +83,8 @@ rm -rf $PRGNAM-r$VERSION
tar xvf $CWD/$PRGNAM-r$VERSION.tar.gz
cd $PRGNAM-r$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# For some reason, j4-dmenu-desktop uses "bash -i -c <command>" to execute
# the user's choice. bash -i means interactive shell... which causes it to
@@ -120,9 +123,9 @@ cd build
install -m0755 -s $PRGNAM $PKG/usr/bin/$PRGNAM
cd ..
-# man page taken from upstream git.
+# Tell the user what the default terminal is, in the man page.
mkdir -p $PKG/usr/man/man1
-sed "s,_TERMINAL_,$MANTERM,g" < $CWD/$PRGNAM.1 | \
+sed "s,to start terminal apps *\$,& (default: $MANTERM)," < $PRGNAM.1 | \
gzip -9c > $PKG/usr/man/man1/$PRGNAM.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -133,4 +136,4 @@ mkdir -p $PKG/install
sed "s,_TERMINAL_,$TERMINAL,g" $CWD/slack-desc > $PKG/install/slack-desc
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