24 lines
641 B
Bash
24 lines
641 B
Bash
#!/bin/sh
|
|
|
|
NAME=nethack
|
|
VERSION=3.6.7
|
|
UPSTREAM=https://www.nethack.org/download/3.6.7/nethack-367-src.tgz
|
|
UPSTREAM_TYPE=custom
|
|
get_upstream(){
|
|
curl "$UPSTREAM" | gzip -cd | tar x -C "$PREFIX/src"
|
|
mv "$PREFIX/src/NetHack-3.6.7" "$SRC"
|
|
}
|
|
. soft
|
|
|
|
NETHACKDIR="$PREFIX/games/nethackdir"
|
|
mkdir -p "$NETHACKDIR"
|
|
|
|
# depends on
|
|
# ncurses-libtinfo-devel
|
|
sed -i .orig -e "22s_^\$_PREFIX = $PREFIX_" "$SRC"/sys/unix/Makefile.top
|
|
sh -c 'cd "$SRC"/sys/unix; sh setup.sh hints/linux'
|
|
sed -i .orig -e "355s_^\$_#define HACKDIR \"$NETHACKDIR\"_" \
|
|
"$SRC"/include/config.h # TODO better way to define HACKDIR?
|
|
$GMAKE -C "$SRC" all
|
|
$GMAKE -C "$SRC" install
|