From 8e45c0016f16ca978ddb2f43095f23c11da1cacc Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 4 May 2022 12:23:15 -0400 Subject: games/rlvm: Clean up package. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- games/rlvm/README | 5 ++-- games/rlvm/doinst.sh | 9 +++++++ games/rlvm/rlvm.SlackBuild | 61 ++++++++++++++++++++++++---------------------- 3 files changed, 44 insertions(+), 31 deletions(-) create mode 100644 games/rlvm/doinst.sh (limited to 'games') 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 ' src/systems/base/gan_graphics_object_data.cc sed -i '1i#include ' 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 -- cgit v1.2.3