wok view nethack/receipt @ rev 24402

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 08 16:59:06 2022 +0000 (2022-02-08)
parents e2073ef01171
children 3abeffdae80b
line source
1 # SliTaz package receipt.
3 PACKAGE="nethack"
4 VERSION="3.6.6"
5 CATEGORY="games"
6 SHORT_DESC="NetHack is a single player dungeon exploration game."
7 MAINTAINER="claudinei@slitaz.org"
8 LICENSE="nethack"
9 TARBALL="$PACKAGE-343-src.tgz"
10 WEB_SITE="http://www.nethack.org"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 DEPENDS="ncurses"
14 BUILD_DEPENDS="ncurses-dev bison flex"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - https://sourceforge.net/projects/nethack/files/nethack/ 2>/dev/null | \
20 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
21 sed '/scope="row/!d;s|.*/nethack/||;s|/.*||;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 sed -i 's|lncurses|& -ltinfo|' sys/unix/Makefile.src
28 sh sys/unix/setup.sh x
29 sed -i "s|\/\* #define LINUX \*\/|#define LINUX|" include/unixconf.h
30 sed -i "s|WINTTYLIB = -ltermlib|# WINTTYLIB = -ltermlib|" src/Makefile
31 sed -i "s|# WINTTYLIB = -lncurses|WINTTYLIB = -lncurses|" src/Makefile
32 sed -i "s|= /usr|= $DESTDIR/usr|" Makefile
33 sed -i "s|= games|= root|" Makefile
34 sed -i "s|= bin|= root|" Makefile
35 sed -i '/rmdir \.\/-p/d' Makefile
36 make && make install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/usr/lib $fs/usr/bin
43 cp -a $install/usr/games/nethack $fs/usr/bin
44 cp -a $install/usr/games/lib/nethackdir $fs/usr/lib
45 sed -i "s|$install/usr/games|/usr|" $fs/usr/bin/nethack
46 }