new package: bsd-games
This commit is contained in:
parent
1c35728005
commit
95d782788e
22
packages/bsd-games/Config.mk.in.patch
Normal file
22
packages/bsd-games/Config.mk.in.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- a/Config.mk.in
|
||||||
|
+++ b/Config.mk.in
|
||||||
|
@@ -7,8 +7,8 @@
|
||||||
|
RANLIB := @RANLIB@
|
||||||
|
INSTALL := @INSTALL@
|
||||||
|
INSTALL_DATA := ${INSTALL} -m 644
|
||||||
|
-INSTALL_PROGRAM := ${INSTALL} -m 755 -s
|
||||||
|
-INSTALL_SCORE := ${INSTALL} -m 664 -g users /dev/null
|
||||||
|
+INSTALL_PROGRAM := ${INSTALL} -m 755
|
||||||
|
+INSTALL_SCORE := ${INSTALL} -m 664 /dev/null
|
||||||
|
|
||||||
|
################ Destination #########################################
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
datadir := @datadir@
|
||||||
|
mandir := @mandir@
|
||||||
|
man6dir := @man6dir@
|
||||||
|
-scoredir := @localstatedir@/${name}
|
||||||
|
+scoredir := @prefix@@localstatedir@/${name}
|
||||||
|
TMPDIR := @TMPDIR@
|
||||||
|
builddir := @builddir@/${name}
|
||||||
|
O := .o/
|
24
packages/bsd-games/build.sh
Normal file
24
packages/bsd-games/build.sh
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://www.polyomino.org.uk/computer/software/bsd-games/
|
||||||
|
TERMUX_PKG_DESCRIPTION="Classic text mode games from UNIX folklore"
|
||||||
|
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||||
|
TERMUX_PKG_LICENSE_FILE="LICENSE, adventure/LICENSE, atc/LICENSE, battlestar/LICENSE, caesar/LICENSE, dab/LICENSE, drop4/LICENSE, gofish/LICENSE, gomoku/LICENSE, hangman/LICENSE, robots/LICENSE, sail/LICENSE, snake/LICENSE, spirhunt/LICENSE, worm/LICENSE, wump/LICENSE"
|
||||||
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
|
_COMMIT=511ca9eb1fe71d3ab1948c0e3b61336150ff389e
|
||||||
|
TERMUX_PKG_VERSION=2021.11.15
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/msharov/bsd-games.git
|
||||||
|
TERMUX_PKG_GIT_BRANCH=master
|
||||||
|
TERMUX_PKG_DEPENDS="ncurses"
|
||||||
|
TERMUX_PKG_BUILD_IN_SRC=true
|
||||||
|
TERMUX_PKG_GROUPS="games"
|
||||||
|
|
||||||
|
termux_step_post_get_source() {
|
||||||
|
git fetch --unshallow
|
||||||
|
git checkout $_COMMIT
|
||||||
|
|
||||||
|
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
|
||||||
|
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
|
||||||
|
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
|
||||||
|
echo " is different from what is expected to be: \"$version\""
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
11
packages/bsd-games/common-util.c.patch
Normal file
11
packages/bsd-games/common-util.c.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/common/util.c
|
||||||
|
+++ b/common/util.c
|
||||||
|
@@ -86,7 +86,7 @@
|
||||||
|
}
|
||||||
|
datahome = getenv ("TMPDIR");
|
||||||
|
if (!datahome)
|
||||||
|
- datahome = "/tmp";
|
||||||
|
+ datahome = "@TERMUX_PREFIX@/tmp";
|
||||||
|
snprintf (buf, bufsz, "%s", datahome);
|
||||||
|
return buf;
|
||||||
|
}
|
11
packages/bsd-games/config.h.in.patch
Normal file
11
packages/bsd-games/config.h.in.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/config.h.in
|
||||||
|
+++ b/config.h.in
|
||||||
|
@@ -11,7 +11,7 @@
|
||||||
|
#define @pkg_uname@_BUGREPORT "@pkg_bugreport@"
|
||||||
|
|
||||||
|
// Path to runtime game state, such as scorefiles
|
||||||
|
-#define _PATH_GAME_STATE "@localstatedir@/@pkg_name@/"
|
||||||
|
+#define _PATH_GAME_STATE "@prefix@@localstatedir@/@pkg_name@/"
|
||||||
|
|
||||||
|
// Path to the system dictionary
|
||||||
|
#define _PATH_WORDLIST "@wordlist@"
|
Loading…
Reference in New Issue
Block a user