Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(main/moria): specify license file #20992

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions packages/moria/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
TERMUX_PKG_HOMEPAGE=https://umoria.org
TERMUX_PKG_DESCRIPTION="Rogue-like game with an infinite dungeon"
TERMUX_PKG_LICENSE="GPL-3.0-or-later"
TERMUX_PKG_LICENSE_FILE="LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=5.7.15
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://github.com/dungeons-of-moria/umoria/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=97f76a68b856dd5df37c20fc57c8a51017147f489e8ee8866e1764778b2e2d57
TERMUX_PKG_DEPENDS="libc++, ncurses"
Expand All @@ -12,18 +13,20 @@ TERMUX_PKG_GROUPS="games"

termux_step_create_debscripts() {
# Create scores file in a debscript, so an update to the package wouldn't erase any scores
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo "DIR=$TERMUX_PREFIX/lib/games/moria" >> postinst
echo "mkdir -p \$DIR" >> postinst
echo "touch \$DIR/scores.dat" >> postinst
chmod 0755 postinst
cat <<-EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
DIR=$TERMUX_PREFIX/lib/games/moria
mkdir -p \$DIR
touch \$DIR/scores.dat
EOF

# https://github.com/termux/termux-packages/issues/1401
echo "#!$TERMUX_PREFIX/bin/sh" > prerm
echo "cd $TERMUX_PREFIX/lib/games/moria || exit" >> prerm
echo "case \$1 in" >> prerm
echo "purge|remove)" >> prerm
echo "rm -f game.sav scores.dat" >> prerm
echo "esac" >> prerm
chmod 0755 prerm
cat <<-EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
cd $TERMUX_PREFIX/lib/games/moria || exit
case \$1 in
purge|remove)
rm -f game.sav scores.dat;;
esac
EOF
}