termux-packages/packages/nethack/build.sh

38 lines
1.2 KiB
Bash
Raw Normal View History

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"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
2020-03-20 13:55:56 +01:00
TERMUX_PKG_VERSION=3.6.6
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"
TERMUX_PKG_BUILD_IN_SRC=true
2019-03-01 02:31:13 +01:00
termux_step_make_install() {
cd $TERMUX_PKG_SRCDIR/sys/unix
sh setup.sh hints/linux
CFLAGS="$CPPFLAGS $CFLAGS $LDFLAGS"
cd $TERMUX_PKG_SRCDIR
cd util
if [ $TERMUX_ARCH_BITS = 32 ]; then
HOST_CC="gcc -m32"
else
HOST_CC="gcc"
fi
CFLAGS="" CC="$HOST_CC" LD="ld" make makedefs
2019-03-01 02:31:13 +01:00
cp makedefs makedefs.host
CFLAGS="" CC="$HOST_CC" LD="ld" make lev_comp
2019-03-01 02:31:13 +01:00
cp lev_comp lev_comp.host
CFLAGS="" CC="$HOST_CC" LD="ld" make dgn_comp dlb recover
2019-03-01 02:31:13 +01:00
cp dgn_comp dgn_comp.host
cp dlb dlb.host
cd ../
make clean
make WINTTYLIB="$LDFLAGS -lcurses" -j $TERMUX_MAKE_PROCESSES
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
cp nethack.6 $TERMUX_PREFIX/share/man/man6/
ln -sf $TERMUX_PREFIX/games/nethack $TERMUX_PREFIX/bin/
}