summaryrefslogtreecommitdiffstats
path: root/games/rejoystick/rejoystick.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/rejoystick/rejoystick.SlackBuild')
-rw-r--r--games/rejoystick/rejoystick.SlackBuild53
1 files changed, 36 insertions, 17 deletions
diff --git a/games/rejoystick/rejoystick.SlackBuild b/games/rejoystick/rejoystick.SlackBuild
index 18f9a8d8ba..08c3ee8515 100644
--- a/games/rejoystick/rejoystick.SlackBuild
+++ b/games/rejoystick/rejoystick.SlackBuild
@@ -1,29 +1,48 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for rejoystick
-# Written by Steven Pledger <linux.propane@yahoo.com>
+# Written by Steven Pledger <email removed>
+# Updated and now maintained by B. Watson <urchlay@slackware.uk>
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20220315 bkw: BUILD=4
+# - new maintainer.
+# - resurrected. all it needed was LIBS="-lX11" to fix compilation.
+# - removed useless INSTALL from doc dir.
+# - add quick start guide to our README.
+# - add a bit of error checking to rejoystick.patch (so it
+# won't segfault if HOME isn't set in the environment).
+# - i486 => i586.
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rejoystick
VERSION=${VERSION:-0.8.1}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
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}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -45,17 +64,15 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$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 {} \+
# Specify the path to the version.mk file inside of the configure script
sed -i "s|^\.\ version\.mk|. ./version.mk|" configure
patch -p1 < $CWD/rejoystick.patch
+LIBS="-lX11" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -67,18 +84,20 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# man page written for this SlackBuild. since this isn't really a game
+# (more of a game-related utility), it's not a section 6 page.
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
# AUTHORS, ChangeLog, and NEWS are empty files
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
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