aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-05-04 12:23:15 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-05-07 13:59:19 +0700
commit8e45c0016f16ca978ddb2f43095f23c11da1cacc (patch)
treee9facbcd6b94621736a0d4a9c4d4e131dff68821 /games
parent52b6caae486b4495880158d6ec661d7de4842ef3 (diff)
games/rlvm: Clean up package.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/rlvm/README5
-rw-r--r--games/rlvm/doinst.sh9
-rw-r--r--games/rlvm/rlvm.SlackBuild61
3 files changed, 44 insertions, 31 deletions
diff --git a/games/rlvm/README b/games/rlvm/README
index a946c3d0bc31c..7f101d00396f5 100644
--- a/games/rlvm/README
+++ b/games/rlvm/README
@@ -2,5 +2,6 @@ rlvm is an open source implementation of the RealLive scripting
engine for Linux and OSX. RealLive is a game engine used in Japan
to write visual novels.
-please make sure you have msgothic.ttc in your homedrive or in the
-game folder. Otherwise the game won't start
+Please make sure you have msgothic.ttc in your home directory or in
+the game folder, otherwise the game won't start. This font is not
+freely downloadable; it ships with Windows and with Steam Proton.
diff --git a/games/rlvm/doinst.sh b/games/rlvm/doinst.sh
new file mode 100644
index 0000000000000..3e5691a052b5b
--- /dev/null
+++ b/games/rlvm/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/rlvm/rlvm.SlackBuild b/games/rlvm/rlvm.SlackBuild
index 5dd2a86368dec..b369a6d296e81 100644
--- a/games/rlvm/rlvm.SlackBuild
+++ b/games/rlvm/rlvm.SlackBuild
@@ -23,15 +23,25 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220502 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - put locale stuff in /usr/share/locale.
+# - create and populate Slackware doc directory.
+# - rewrite part of the script to use a loop instead of copypasta.
+# - create doinst.sh: update icon cache and desktop database.
+# - abs path to exe in .desktop (remove /usr/bin/ symlink).
+# - strip executable.
+# - explain where to get msgothic.ttc in README.
+# Note to maintainer: consider patching the code to look for msgothic.ttc
+# in /usr/share/fonts/TTF/, since that is the standard place to find TTF
+# and TTC fonts in Slackware.
+
# 20220221 bkw: Modified by SlackBuilds.org: fix build on 15.0.
-# TODO: Someone should explain why there's both /usr/games/rlvm and
-# /usr/bin/rlvm in the package. Not today.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM="rlvm"
VERSION=${VERSION:-0.14}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -69,6 +79,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+# 20220502 bkw: in case someone don't have /usr/games in $PATH:
+sed -i '/^Exec/s,=,=/usr/games/,' src/platforms/gtk/rlvm.desktop
+
# 20220221 bkw: C++ infelicities.
sed -i '1i#include <iostream>' src/systems/base/gan_graphics_object_data.cc
sed -i '1i#include <memory>' src/systems/base/system.h
@@ -80,40 +93,30 @@ SCONSFIX+=" site_scons/site_tools/rlvm.py"
scons --release
-mkdir -p ${PKG}/usr/games ${PKG}/usr/bin
-cp build/release/rlvm $PKG/usr/games
+mkdir -p ${PKG}/usr/games
+install -s -m0755 build/release/$PRGNAM $PKG/usr/games
-(
- cd $PKG/usr/bin
- ln -s /usr/games/rlvm rlvm
-)
+for i in resources/[0-9]*/; do
+ px=$( basename $i )
+ dir=$PKG/usr/share/icons/hicolor/${px}x${px}/apps
+ mkdir -p $dir
+ cp -a $i/$PRGNAM.png $dir
+done
-mkdir -p ${PKG}/usr/share
-cp -R build/locale/* $PKG/usr/share
+mkdir -p ${PKG}/usr/share/locale
+cp -R build/locale/* $PKG/usr/share/locale
mkdir -p ${PKG}/usr/share/applications
-cp src/platforms/gtk/rlvm.desktop $PKG/usr/share/applications
-
-mkdir -p ${PKG}/usr/share/icons/hicolor/16x16/apps
-cp resources/16/rlvm.png $PKG/usr/share/icons/hicolor/16x16/apps
-
-mkdir -p ${PKG}/usr/share/icons/hicolor/24x24/apps
-cp resources/24/rlvm.png $PKG/usr/share/icons/hicolor/24x24/apps
-
-mkdir -p ${PKG}/usr/share/icons/hicolor/32x32/apps
-cp resources/32/rlvm.png $PKG/usr/share/icons/hicolor/32x32/apps
-
-mkdir -p ${PKG}/usr/share/icons/hicolor/48x48/apps
-cp resources/48/rlvm.png $PKG/usr/share/icons/hicolor/48x48/apps
-
-mkdir -p ${PKG}/usr/share/icons/hicolor/128x128/apps
-cp resources/128/rlvm.png $PKG/usr/share/icons/hicolor/128x128/apps
+cp src/platforms/gtk/$PRGNAM.desktop $PKG/usr/share/applications
-mkdir -p ${PKG}/usr/share/icons/hicolor/256x256/apps
-cp resources/256/rlvm.png $PKG/usr/share/icons/hicolor/256x256/apps
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a *.txt *.TXT doc/* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p ${PKG}/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l n -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE