summaryrefslogtreecommitdiffstats
path: root/games/adl/adl.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/adl/adl.SlackBuild')
-rw-r--r--games/adl/adl.SlackBuild32
1 files changed, 17 insertions, 15 deletions
diff --git a/games/adl/adl.SlackBuild b/games/adl/adl.SlackBuild
index 3bad33f5c3..df2911a7f0 100644
--- a/games/adl/adl.SlackBuild
+++ b/games/adl/adl.SlackBuild
@@ -1,20 +1,18 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for adl
-# 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.
-# 93 (1993) is the timestamp of the tarball. Most of the files
-# inside are stamped May 10 1991, and the copyright notice
-# says 1987.
-
# In case anyone's wondering: compiled ADL files are NOT architecture
# independent. 32-bit adlcomp produces files that won't run on a 64-bit
# adlrun, and vice versa.
+# 20220407 bkw: BUILD=2, fix permissions in doc dir.
+
# 20180122 bkw: It turns out that adl development continued up
# through 2011, with a Windows and Linux binary release in 2003.
# The ADL language and bytecode formats were changed for the 2003
@@ -26,10 +24,13 @@
# 20170621 bkw: add -j1 to the make commands. I got a mysterious
# build failure that I couldn't duplicate, hopefully this fixes it.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=adl
VERSION=${VERSION:-20110628}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,7 +40,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}
@@ -70,11 +75,8 @@ YEAR=93
tar xvf $CWD/$PRGNAM.tar.Z
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 {} \+
# Patch does this:
# - fix various compile errors (mostly relating to lack of ANSI prototypes).
@@ -191,7 +193,7 @@ patch -p1 < $CWD/compilefixes$YEAR.diff
# Install the docs first, so we don't get the compiled samples/demos.
DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM$YEAR
mkdir -p $DOCDIR
-chmod 644 doc/*.*
+find doc samples -type f -exec chmod 0644 {} \+
cp -a C* porting readme doc samples $DOCDIR
make -j1 all BIN=$PKG/usr/games OPTFLAGS="$SLKCFLAGS"
@@ -212,4 +214,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