Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # $OpenBSD: Makefile,v 1.62 2017/05/08 12:53:28 schwarze Exp $
  2. COMMENT = dungeon explorin', hackin', game. Piece of cake
  3. V = 3.4.3
  4. DISTNAME = nethack-$V
  5. PKGNAME = ${DISTNAME}
  6. REVISION = 9
  7. CATEGORIES = games
  8. MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=nethack/}
  9. DISTFILES = nethack-${V:S/.//g}-src.tgz
  10. HOMEPAGE = http://nethack.org/
  11. MAINTAINER = Marc Espie <espie@openbsd.org>
  12. # GPL
  13. PERMIT_PACKAGE_CDROM = Yes
  14. WANTLIB = c termlib
  15. FAKE_FLAGS = PREFIX=${PREFIX}
  16. GAMEDIR = lib/nethackdir-$V
  17. NHDIR = ${TRUEPREFIX}/${GAMEDIR}
  18. MAKE_ENV += NHDIR=${NHDIR} NETHACKCONFIG=${NETHACKCONFIG}
  19. FLAVORS = no_x11 qt
  20. FLAVOR ?=
  21. .if ${FLAVOR} == "no_x11"
  22. NETHACKCONFIG = ${FILESDIR}/simple-config
  23. .elif ${FLAVOR} == "qt"
  24. NETHACKCONFIG = ${FILESDIR}/qt-config
  25. MODULES = x11/qt3
  26. WANTLIB += SM m pthread ${LIBCXX}
  27. .else
  28. NETHACKCONFIG = ${FILESDIR}/x-config
  29. WANTLIB += X11 Xaw Xext Xmu Xpm Xt pthread-stubs xcb
  30. .endif
  31. RUN_DEPENDS = games/hackdata
  32. NO_TEST = Yes
  33. SUBST_VARS = GAMEDIR V
  34. do-configure:
  35. @cd ${WRKSRC}/sys/unix; /bin/sh setup.sh symlinks
  36. post-build:
  37. @cd ${WRKSRC}/util && ${MAKE_ENV} make recover
  38. post-install:
  39. ${INSTALL_PROGRAM} ${WRKBUILD}/util/recover ${PREFIX}/bin/recover-$V
  40. ${INSTALL_MAN} ${WRKSRC}/doc/nethack.6 ${PREFIX}/man/man6/nethack-$V.6
  41. ${INSTALL_MAN} ${WRKSRC}/doc/recover.6 ${PREFIX}/man/man6/recover-$V.6
  42. ${INSTALL_PROGRAM} ${PREFIX}/bin/nethack ${PREFIX}/bin/nethack-$V
  43. .if ${FLAVOR} == ""
  44. ${INSTALL_DATA_DIR} ${PREFIX}/lib/X11/app-defaults
  45. @cd ${WRKSRC}/win/X11 && cp NetHack.ad NetHack-$V && \
  46. ${INSTALL_DATA} NetHack-$V ${PREFIX}/lib/X11/app-defaults
  47. .endif
  48. .include <bsd.port.mk>