From 4d1fce68801fb022fcf3597b5c6b5b6806bab981 Mon Sep 17 00:00:00 2001 From: Hunter Sezen Date: Sat, 24 Aug 2019 07:22:33 +0700 Subject: games/zbom: Added (Zelda fangame for the solarus engine). Signed-off-by: Willy Sudiarto Raharjo --- .../0001-Respect-solarus-install-variables.patch | 57 +++++++++++++++ games/zbom/README | 5 ++ games/zbom/doinst.sh | 9 +++ games/zbom/install.patch | 84 ++++++++++++++++++++++ games/zbom/slack-desc | 19 +++++ games/zbom/zbom.SlackBuild | 80 +++++++++++++++++++++ games/zbom/zbom.info | 10 +++ 7 files changed, 264 insertions(+) create mode 100644 games/zbom/0001-Respect-solarus-install-variables.patch create mode 100644 games/zbom/README create mode 100644 games/zbom/doinst.sh create mode 100644 games/zbom/install.patch create mode 100644 games/zbom/slack-desc create mode 100644 games/zbom/zbom.SlackBuild create mode 100644 games/zbom/zbom.info (limited to 'games') diff --git a/games/zbom/0001-Respect-solarus-install-variables.patch b/games/zbom/0001-Respect-solarus-install-variables.patch new file mode 100644 index 000000000000..a16325f99809 --- /dev/null +++ b/games/zbom/0001-Respect-solarus-install-variables.patch @@ -0,0 +1,57 @@ +From 265c1fcc47b4981f5ed6eaa127d87924fa8e13b1 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Mon, 19 Aug 2019 15:50:42 -0700 +Subject: [PATCH] Respect solarus install variables. + +--- + CMakeLists.txt | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6a9f7bb2..bbea7efd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,16 @@ project(ZBOM) + + set(quest_name "zbom") + ++set(SOLARUS_INSTALL_DATAROOTDIR "share" CACHE PATH "dataroot dir") ++set(SOLARUS_INSTALL_DATADIR "${SOLARUS_INSTALL_DATAROOTDIR}/solarus" CACHE PATH "data dir") ++set(SOLARUS_INSTALL_BINDIR "bin" CACHE PATH "bin dir") ++ ++if (IS_ABSOLUTE ${SOLARUS_INSTALL_DATADIR}) ++ set(SOLARUS_INSTALL_ABSOLUTE_DATADIR ${SOLARUS_INSTALL_DATADIR}) ++else() ++ set(SOLARUS_INSTALL_ABSOLUTE_DATADIR ${CMAKE_INSTALL_PREFIX}/${SOLARUS_INSTALL_DATADIR}) ++endif() ++ + # data files list + file(GLOB_RECURSE data_files + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/data +@@ -46,8 +56,8 @@ add_custom_target(${quest_name}_data + # create a script that executes the engine with this quest + add_custom_command( + OUTPUT ${quest_name} +- COMMAND echo '\#!/bin/bash' > ${quest_name} +- COMMAND echo 'solarus ${CMAKE_INSTALL_PREFIX}/share/solarus/${quest_name} $*' >> ${quest_name} ++ COMMAND echo '\#!/bin/sh' > ${quest_name} ++ COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $$*' >> ${quest_name} + ) + add_custom_target(${quest_name}_command + ALL +@@ -56,10 +66,10 @@ add_custom_target(${quest_name}_command + + # install the data archive + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/data.solarus +- DESTINATION share/solarus/${quest_name} ++ DESTINATION ${SOLARUS_INSTALL_DATADIR}/${quest_name} + ) + + # install the script + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${quest_name} +- DESTINATION bin ++ DESTINATION ${SOLARUS_INSTALL_BINDIR} + ) +-- +2.22.0 + diff --git a/games/zbom/README b/games/zbom/README new file mode 100644 index 000000000000..29b06963a092 --- /dev/null +++ b/games/zbom/README @@ -0,0 +1,5 @@ +Link's newest quest is set a few generations after Twilight Princess and +spans two different continents of Hyrule. Explore eight unique temples +and defeat enemies and bosses in order to gain powerful items to assist +you in your goal. Explore many areas of Hyrule and assist different +races in their conflicts. diff --git a/games/zbom/doinst.sh b/games/zbom/doinst.sh new file mode 100644 index 000000000000..65c7e2eeb9aa --- /dev/null +++ b/games/zbom/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 -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/games/zbom/install.patch b/games/zbom/install.patch new file mode 100644 index 000000000000..20d2da0b1ee1 --- /dev/null +++ b/games/zbom/install.patch @@ -0,0 +1,84 @@ +From 87a3922cd5e9fe7a6f42f7b04c36a82798c0d8c8 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Mon, 19 Aug 2019 15:41:34 -0700 +Subject: [PATCH 1/2] Add a desktop file. + +--- + CMakeLists.txt | 6 ++++++ + zbom.desktop | 9 +++++++++ + 2 files changed, 15 insertions(+) + create mode 100644 zbom.desktop + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6a9f7bb2..98fec905 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,3 +63,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/data.solarus + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${quest_name} + DESTINATION bin + ) ++ ++# FreeDesktop compatible start menu launcher ++if(UNIX AND NOT APPLE) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/zbom.desktop ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) ++endif(UNIX AND NOT APPLE) +diff --git a/zbom.desktop b/zbom.desktop +new file mode 100644 +index 00000000..4cb80148 +--- /dev/null ++++ b/zbom.desktop +@@ -0,0 +1,9 @@ ++[Desktop Entry] ++Name=Zelda: Book of Mudora ++GenericName=Zelda fangame for the Solarus engine ++Comment=Zelda: Book of Mudora (action rpg game) ++Exec=zbom ++Terminal=false ++Type=Application ++Icon=zbom ++Categories=Game;AdventureGame; +-- +2.22.0 + +From 7cfe8c127d9685067faa1b53dae5bb052365da1a Mon Sep 17 00:00:00 2001 +From: orbea +Date: Mon, 19 Aug 2019 15:45:06 -0700 +Subject: [PATCH 2/2] Install icons. + +--- + CMakeLists.txt | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 98fec905..5e700a30 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,6 +64,24 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${quest_name} + DESTINATION bin + ) + ++# FreeDesktop compatible icons ++if(UNIX AND NOT APPLE) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/logos/icon_16.png ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/16x16/apps RENAME zbom.png) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/logos/icon_24.png ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/24x24/apps RENAME zbom.png) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/logos/icon_32.png ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps RENAME zbom.png) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/logos/icon_48.png ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps RENAME zbom.png) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/logos/icon_64.png ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps RENAME zbom.png) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/logos/icon_128.png ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps RENAME zbom.png) ++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/logos/logo@2x.png ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME zbom.png) ++endif(UNIX AND NOT APPLE) ++ + # FreeDesktop compatible start menu launcher + if(UNIX AND NOT APPLE) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/zbom.desktop +-- +2.22.0 + diff --git a/games/zbom/slack-desc b/games/zbom/slack-desc new file mode 100644 index 000000000000..24a815bdf275 --- /dev/null +++ b/games/zbom/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +zbom: zbom (Zelda fangame for the solarus engine) +zbom: +zbom: Link's newest quest is set a few generations after Twilight Princess +zbom: and spans two different continents of Hyrule. Explore eight unique +zbom: temples and defeat enemies and bosses in order to gain powerful items +zbom: to assist you in your goal. Explore many areas of Hyrule and assist +zbom: different races in their conflicts. +zbom: +zbom: Homeage: https://sites.google.com/site/zeldabom/ +zbom: +zbom: diff --git a/games/zbom/zbom.SlackBuild b/games/zbom/zbom.SlackBuild new file mode 100644 index 000000000000..3e866dbdfb9d --- /dev/null +++ b/games/zbom/zbom.SlackBuild @@ -0,0 +1,80 @@ +#!/bin/sh + +# Slackware build script for Zelda: Book of Mudora + +# Copyright 2019 Hunter Sezen California, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=zbom +VERSION=${VERSION:-1.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +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 {} \; + +# Respect solarus install variables. +# https://github.com/wrightmat/zbom/pull/122 +patch -p1 < $CWD/0001-Respect-solarus-install-variables.patch + +# Add a desktop file and install the hicolor icons. +# https://github.com/wrightmat/zbom/pull/123 +patch -p1 < $CWD/install.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DSOLARUS_INSTALL_BINDIR:PATH=games \ + -DSOLARUS_INSTALL_DATADIR:PATH=share/games/solarus \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.md $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 +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/zbom/zbom.info b/games/zbom/zbom.info new file mode 100644 index 000000000000..80bb150d6f19 --- /dev/null +++ b/games/zbom/zbom.info @@ -0,0 +1,10 @@ +PRGNAM="zbom" +VERSION="1.4" +HOMEPAGE="https://sites.google.com/site/zeldabom/" +DOWNLOAD="https://github.com/wrightmat/zbom/archive/v1.4/zbom-1.4.tar.gz" +MD5SUM="4092f25e35d0b78ad2d0bb2afc5eef45" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="solarus" +MAINTAINER="Hunter Sezen" +EMAIL="orbea@riseup.net" -- cgit v1.2.3