summaryrefslogtreecommitdiffstats
path: root/desktop/xdgmenumaker/xdgmenumaker.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/xdgmenumaker/xdgmenumaker.SlackBuild')
-rw-r--r--desktop/xdgmenumaker/xdgmenumaker.SlackBuild23
1 files changed, 18 insertions, 5 deletions
diff --git a/desktop/xdgmenumaker/xdgmenumaker.SlackBuild b/desktop/xdgmenumaker/xdgmenumaker.SlackBuild
index eb22508dad..575ffb9a1a 100644
--- a/desktop/xdgmenumaker/xdgmenumaker.SlackBuild
+++ b/desktop/xdgmenumaker/xdgmenumaker.SlackBuild
@@ -1,12 +1,15 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for xdgmenumaker
# Originally written by Andrew Tkalia
-# Modified by B. Watson (yalhcru@gmail.com)
+# Modified by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/
# for details.
+# 20230711 bkw: updated for v2.1.
+# 20221229 bkw: updated for v2.0.
+# 20220110 bkw: BUILD=2, update slightly for new txt2tags.
# 20201103 bkw: updated for v1.6.
# 20180917 bkw: updated for v1.5.
# 20170301 bkw: Use long-form github URL.
@@ -18,15 +21,22 @@
# 20150914 bkw: updated 0.5 => 0.8. upstream now uses a Makefile
# instead of install.sh so this script can't build the old version.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=xdgmenumaker
-VERSION=${VERSION:-1.6}
+VERSION=${VERSION:-2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
# pure python, no compiled code at all
ARCH=noarch
-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}
@@ -50,6 +60,9 @@ sed -i 's,share/man,man,' Makefile
# dynamic menu to work, the man page should reflect this:
sed -i '/``xdgmenumaker -f windowmaker``/s,``,``/usr/bin/,' man/$PRGNAM.t2t
+# 20220110 bkw: new txt2tags 3.7 doesn't support %%mtime in .t2t, so:
+sed -i "s,^%%mtime.*,$( date +%Y-%m-%d )," man/$PRGNAM.t2t
+
make -j1 man install DESTDIR=$PKG PREFIX=/usr
gzip $PKG/usr/man/man1/$PRGNAM.1
@@ -62,4 +75,4 @@ mkdir -p $PKG/install
cat $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