summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/o2em/README5
-rw-r--r--games/o2em/doinst.sh1
-rw-r--r--games/o2em/o2em.6 (renamed from games/o2em/o2em.1)8
-rw-r--r--games/o2em/o2em.SlackBuild53
-rw-r--r--games/o2em/o2em.info2
-rw-r--r--games/o2em/o2em.sh2
-rw-r--r--games/o2em/slack-desc2
7 files changed, 42 insertions, 31 deletions
diff --git a/games/o2em/README b/games/o2em/README
index 43d8cd8449..557e53f20a 100644
--- a/games/o2em/README
+++ b/games/o2em/README
@@ -1,3 +1,5 @@
+o2em (Magnavox Odyssey II/VideoPac+ emulator)
+
o2em is an emulator for the Magnavox Odyssey II and VideoPac+ systems.
The Odyssey2 BIOS ROM image is required for emulation. To include it in
@@ -6,3 +8,6 @@ image itself, called either o2rom.bin or o2bios.rom, and place it in the
build directory before running the SlackBuild. The ROM will be installed
in /usr/share/o2em/bios/o2rom.bin; if you build the package without the
ROM, just place a copy of the ROM there after installing the package.
+
+Note to desktop users: o2em is a command-line X program and must be
+run from an X terminal. It won't appear in your applications menu.
diff --git a/games/o2em/doinst.sh b/games/o2em/doinst.sh
index 19400050fd..4110f5514d 100644
--- a/games/o2em/doinst.sh
+++ b/games/o2em/doinst.sh
@@ -3,4 +3,3 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi
-
diff --git a/games/o2em/o2em.1 b/games/o2em/o2em.6
index f065163635..6de8e2c234 100644
--- a/games/o2em/o2em.1
+++ b/games/o2em/o2em.6
@@ -1,4 +1,4 @@
-.TH O2EM "1" "January 2011" "SlackBuilds.org" "User Commands"
+.TH O2EM "6" "Nov 2021" "1.18" "SlackBuilds.org"
.SH NAME
o2em \- Emulator for Odyssey II and VideoPac+ systems
.SH SYNOPSIS
@@ -151,7 +151,7 @@ Enables/Disables the O2 keyboard input of the keys used by
joystick emulation
.SH FILES
.TP
-\fB/usr/bin/o2em\fR
+\fB/usr/games/o2em\fR
Shell script wrapper. Sets up ~/.o2em if needed, runs the actual
binary. This is required because o2em was ported from DOS, and
expects to be run in its own directory; with the wrapper, it
@@ -162,7 +162,7 @@ to ~/.o2em).
The actual o2em binary. Normally, you don't want to run this
directly (let the wrapper run it for you).
.TP
-\fB/usr/share/o2em/bios\fR
+\fB/usr/share/games/o2em/bios\fR
BIOS ROM images. At minimum, \fBo2rom.bin\fR must exist. To use the
\fB\-c52\fR,
\fB\-jopac\fR, or
@@ -183,7 +183,7 @@ o2rom.bin (md5sum 562d5ebf9e030a40d6fabfc2f33139fd)
These are the same files used by MESS, except o2rom.bin is called
o2bios.rom by MESS.
.TP
-\fB/usr/share/o2em/voice\fR
+\fB/usr/share/games/o2em/voice\fR
Voice samples, used to emulate the Odyssey2's speech synthesis chip.
.TP
\fB~/.o2em/\fR
diff --git a/games/o2em/o2em.SlackBuild b/games/o2em/o2em.SlackBuild
index 896b9b60c0..3beb1561ee 100644
--- a/games/o2em/o2em.SlackBuild
+++ b/games/o2em/o2em.SlackBuild
@@ -6,11 +6,18 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211102 bkw: BUILD=2
+# - fix -current build.
+# - binaries in /usr/games.
+# - man page in section 6.
+# - /usr/share/o2em => /usr/share/games/o2em.
+# - convert docs to utf-8.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=o2em
VERSION=${VERSION:-1.18}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +29,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -55,11 +59,8 @@ rm -rf $SRC
unzip -L $CWD/$SRC.zip
cd $SRC
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 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:
# make makefile.linux use allegro-config to find cflags/libs for allegro
@@ -71,26 +72,26 @@ patch -p1 < $CWD/compile_fix.diff
patch -p1 < $CWD/wordsize.diff
cd src
-make -f makefile.linux SLKCFLAGS="$SLKCFLAGS"
+make -f makefile.linux SLKCFLAGS="$SLKCFLAGS -fcommon"
-mkdir -p $PKG/usr/bin $PKG/usr/libexec $PKG/usr/share/pixmaps
-install -s -m0755 -oroot -groot dis48 $PKG/usr/bin
+mkdir -p $PKG/usr/games $PKG/usr/libexec \
+ $PKG/usr/share/pixmaps $PKG/usr/share/icons/hicolor/64x64/apps
+install -s -m0755 -oroot -groot dis48 $PKG/usr/games
install -s -m0755 -oroot -groot $PRGNAM $PKG/usr/libexec/$PRGNAM.bin
-install -m0755 -oroot -groot $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
-install -m0644 -oroot -groot $PRGNAM.png $PKG/usr/share/pixmaps
+install -m0755 -oroot -groot $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM
+install -m0644 -oroot -groot $PRGNAM.png $PKG/usr/share/icons/hicolor/64x64/apps
+ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# There is no .desktop file because the emulator lacks a UI (if we
# launch it from the K menu, it prints an error on stdout and exits),
# and because ".bin" isn't much of a MIME type so we can't really
# do association (there's no magic header for the ROMs either).
-mkdir -p $PKG/usr/man/man1
-gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+mkdir -p $PKG/usr/man/man6
+gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
-mkdir -p $PKG/usr/share/$PRGNAM/{bios,voice}
-if [ -e "$CWD/o2mainsamp.zip" ]; then
- unzip -L $CWD/o2mainsamp.zip -d $PKG/usr/share/$PRGNAM/voice
-fi
+mkdir -p $PKG/usr/share/games/$PRGNAM/{bios,voice}
+unzip -L $CWD/o2mainsamp.zip -d $PKG/usr/share/games/$PRGNAM/voice
if [ -e $CWD/odyssey2.zip ]; then
unzip $CWD/odyssey2.zip
@@ -102,18 +103,24 @@ elif [ -e $CWD/o2rom.bin ]; then
fi
if [ -n "$ROMFILE" ]; then
- cat $ROMFILE > $PKG/usr/share/$PRGNAM/bios/o2rom.bin
+ cat $ROMFILE > $PKG/usr/share/games/$PRGNAM/bios/o2rom.bin
+ INCROM="includes"
+else
+ INCROM="does NOT include"
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd ../docs
for file in *; do
- sed 's/\r//g' < $file > $PKG/usr/doc/$PRGNAM-$VERSION/$file
+ sed 's/\r//g' < $file \
+ | iconv -f iso-8859-1 -t utf-8 \
+ > $PKG/usr/doc/$PRGNAM-$VERSION/$file
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed -e "s,@INCROM@,$INCROM," \
+ $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
diff --git a/games/o2em/o2em.info b/games/o2em/o2em.info
index b666a22e2e..c10553324d 100644
--- a/games/o2em/o2em.info
+++ b/games/o2em/o2em.info
@@ -1,7 +1,7 @@
PRGNAM="o2em"
VERSION="1.18"
HOMEPAGE="http://o2em.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/project/o2em/o2em/1.18/o2em118src.zip \
+DOWNLOAD="https://downloads.sourceforge.net/project/o2em/o2em/1.18/o2em118src.zip \
http://o2em.sourceforge.net/files/o2mainsamp.zip"
MD5SUM="be96af886370df337fe8584827717627 \
9910ecb7d87fcd5696dd4dd00c792e33"
diff --git a/games/o2em/o2em.sh b/games/o2em/o2em.sh
index 5c0d75163c..7c42edf03e 100644
--- a/games/o2em/o2em.sh
+++ b/games/o2em/o2em.sh
@@ -12,7 +12,7 @@
# source, but we want to avoid massive amounts of patching.
EXE=/usr/libexec/o2em.bin
-SHAREDIR=/usr/share/o2em
+SHAREDIR=/usr/share/games/o2em
DIR=~/.o2em
if [ ! -d $DIR ]; then
diff --git a/games/o2em/slack-desc b/games/o2em/slack-desc
index 9a413ec45d..ce93fb7947 100644
--- a/games/o2em/slack-desc
+++ b/games/o2em/slack-desc
@@ -10,7 +10,7 @@ o2em: o2em (Magnavox Odyssey II/VideoPac+ emulator)
o2em:
o2em: o2em is an emulator for the Magnavox Odyssey II and VideoPac+ systems.
o2em:
-o2em:
+o2em: This package @INCROM@ the system ROM image.
o2em:
o2em:
o2em: