summaryrefslogtreecommitdiffstats
path: root/audio/eawpats/eawpats.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/eawpats/eawpats.SlackBuild')
-rw-r--r--audio/eawpats/eawpats.SlackBuild34
1 files changed, 24 insertions, 10 deletions
diff --git a/audio/eawpats/eawpats.SlackBuild b/audio/eawpats/eawpats.SlackBuild
index d109f72ed9..295d67e7b6 100644
--- a/audio/eawpats/eawpats.SlackBuild
+++ b/audio/eawpats/eawpats.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for eawpats
-# 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.
@@ -11,6 +11,15 @@
# This is the original author's site, but it's more polite to download
# from the gentoo mirror (see .info file)
+# 20230111 bkw: BUILD=4, symlink eawpats.cfg to /etc/timidity.cfg (the
+# "old" location), since SDL 1.2's SDL_mixer still uses it. Makes the
+# music work in odamex (and probably various other games). Also add
+# a douninst.sh that will remove the symlinks if they still point
+# to eawpats.cfg.
+
+# 20191201 bkw: symlink eawpats.cfg to timidity.cfg in doinst.sh,
+# if there's no timidity.cfg already. This makes things Just Work(tm).
+
# 20140511 bkw: one patch was missing due to tar being silly.
# When extracting (with tar, which is really tar-1.26 on slack 14.1):
# tar: eawpats/charang.pat: implausibly old time stamp 1969-12-31 18:59:59
@@ -20,14 +29,21 @@
# I only ever noticed this because allegro's pat2dat chokes on
# missing patches.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=eawpats
VERSION=${VERSION:-12}
SRCVER=${VERSION}_full
ARCH=noarch
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -41,11 +57,8 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM$SRCVER.tar.gz
cd $PRGNAM
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 {} \+
# see above
touch charang.pat
@@ -70,6 +83,7 @@ mv * $PKG/usr/share/sounds/$PRGNAM
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/douninst.sh > $PKG/install/douninst.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