2019-03-01 02:31:13 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=http://www.nethack.org/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Dungeon crawl game"
|
|
|
|
TERMUX_PKG_LICENSE="Nethack"
|
2020-08-18 20:38:08 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
2020-03-20 13:55:56 +01:00
|
|
|
TERMUX_PKG_VERSION=3.6.6
|
2021-11-27 07:34:26 +01:00
|
|
|
TERMUX_PKG_REVISION=5
|
2019-03-16 01:02:53 +01:00
|
|
|
TERMUX_PKG_SRCURL=http://www.nethack.org/download/${TERMUX_PKG_VERSION}/nethack-${TERMUX_PKG_VERSION//./}-src.tgz
|
2020-03-20 13:55:56 +01:00
|
|
|
TERMUX_PKG_SHA256=cfde0c3ab6dd7c22ae82e1e5a59ab80152304eb23fb06e3129439271e5643ed2
|
2020-01-13 14:36:08 +01:00
|
|
|
TERMUX_PKG_DEPENDS="gzip, ncurses"
|
2019-08-13 15:19:08 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2021-11-27 12:12:04 +01:00
|
|
|
TERMUX_PKG_HOSTBUILD=true
|
2021-12-18 10:31:10 +01:00
|
|
|
TERMUX_PKG_GROUPS="games"
|
2019-03-01 02:31:13 +01:00
|
|
|
|
2021-11-27 12:12:04 +01:00
|
|
|
termux_step_host_build() {
|
|
|
|
cp -r $TERMUX_PKG_SRCDIR/* .
|
|
|
|
pushd sys/unix
|
2019-03-01 02:31:13 +01:00
|
|
|
sh setup.sh hints/linux
|
2021-11-27 12:12:04 +01:00
|
|
|
popd && cd util
|
2019-08-27 07:00:14 +02:00
|
|
|
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
|
|
|
HOST_CC="gcc -m32"
|
2020-09-25 21:08:12 +02:00
|
|
|
else
|
2019-08-27 07:00:14 +02:00
|
|
|
HOST_CC="gcc"
|
|
|
|
fi
|
|
|
|
CFLAGS="" CC="$HOST_CC" LD="ld" make makedefs
|
|
|
|
CFLAGS="" CC="$HOST_CC" LD="ld" make lev_comp
|
|
|
|
CFLAGS="" CC="$HOST_CC" LD="ld" make dgn_comp dlb recover
|
2021-11-27 12:12:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_pre_configure() {
|
|
|
|
WINTTYLIB="$LDFLAGS -lcurses"
|
|
|
|
export LFLAGS="$LDFLAGS"
|
|
|
|
export CFLAGS="$CPPFLAGS $CFLAGS"
|
|
|
|
cd sys/unix
|
|
|
|
sh setup.sh hints/linux
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_configure() {
|
|
|
|
# cp hostbuilt tools from hostbuild dir
|
|
|
|
cp $TERMUX_PKG_HOSTBUILD_DIR/util/{makedefs,lev_comp,dgn_comp,dlb} \
|
|
|
|
util/
|
|
|
|
touch -d "next hour" util/*
|
2020-10-11 10:29:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_make_install() {
|
2019-03-11 11:57:28 +01:00
|
|
|
cd doc
|
2019-03-01 02:31:13 +01:00
|
|
|
mkdir -p $TERMUX_PREFIX/share/man/man6
|
2021-11-27 12:12:04 +01:00
|
|
|
install -m600 nethack.6 $TERMUX_PREFIX/share/man/man6/
|
2019-03-01 02:31:13 +01:00
|
|
|
ln -sf $TERMUX_PREFIX/games/nethack $TERMUX_PREFIX/bin/
|
|
|
|
}
|
2020-09-25 21:08:12 +02:00
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
|
|
|
echo "mkdir -p $TERMUX_PREFIX/games/nethackdir/save" >> postinst
|
|
|
|
echo "exit 0" >> postinst
|
|
|
|
}
|