Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # $OpenBSD: Makefile,v 1.5 2016/12/31 10:48:00 jsg Exp $
  2. COMMENT = Hexen II: Hammer of Thyrion
  3. V = 1.5.8
  4. DISTNAME = hexen2source-${V}
  5. PKGNAME = uhexen2-${V}
  6. EXTRACT_SUFX = .tgz
  7. DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
  8. hexen2-${V}-linux-i586.tgz
  9. CATEGORIES = games
  10. HOMEPAGE = http://uhexen2.sourceforge.net/
  11. MAINTAINER = Edd Barrett <edd@openbsd.org>
  12. MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=uhexen2/}
  13. # GPLv2
  14. PERMIT_PACKAGE_CDROM = Yes
  15. .if ${MACHINE_ARCH} == "i386"
  16. BUILD_DEPENDS = devel/nasm
  17. .endif
  18. LIB_DEPENDS = devel/sdl \
  19. audio/libmad \
  20. audio/libvorbis
  21. WANTLIB += SDL c m mad ogg pthread vorbis vorbisfile
  22. USE_GMAKE = Yes
  23. MAKE_FLAGS += CC=${CC}
  24. DOMAKE = ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS}
  25. do-build:
  26. cd ${WRKBUILD}/engine/hexen2 && ${DOMAKE} h2
  27. cd ${WRKBUILD}/engine/hexen2 && ${DOMAKE} clean
  28. cd ${WRKBUILD}/engine/hexen2 && ${DOMAKE} glh2
  29. cd ${WRKBUILD}/engine/hexen2/server && ${DOMAKE}
  30. cd ${WRKBUILD}/engine/hexenworld/server && ${DOMAKE}
  31. cd ${WRKBUILD}/engine/hexenworld/client && ${DOMAKE} hw
  32. cd ${WRKBUILD}/engine/hexenworld/client && ${DOMAKE} clean
  33. cd ${WRKBUILD}/engine/hexenworld/client && ${DOMAKE} glhw
  34. cd ${WRKBUILD}/h2patch && ${DOMAKE}
  35. cd ${WRKBUILD}/hw_utils/hwmaster && ${DOMAKE}
  36. cd ${WRKBUILD}/hw_utils/hwmquery && ${DOMAKE}
  37. cd ${WRKBUILD}/hw_utils/hwrcon && ${DOMAKE}
  38. BINS = engine/hexen2/hexen2 \
  39. engine/hexen2/glhexen2 \
  40. engine/hexen2/server/h2ded \
  41. engine/hexenworld/client/hwcl \
  42. engine/hexenworld/client/glhwcl \
  43. engine/hexenworld/server/hwsv \
  44. h2patch/h2patch \
  45. hw_utils/hwmaster/hwmaster \
  46. hw_utils/hwmquery/hwmquery \
  47. hw_utils/hwrcon/hwrcon
  48. DATA = ${PREFIX}/share/uhexen2
  49. TRUEDATA = ${TRUEPREFIX}/share/uhexen2
  50. do-install:
  51. cp -r ${WRKDIR}/hexen2-${V} ${DATA}
  52. chown -R ${SHAREOWN}:${SHAREGRP} ${DATA}
  53. mv ${DATA}/docs ${PREFIX}/share/doc/uhexen2
  54. # Grr. Need to run out of data dir.
  55. .for B in ${BINS}
  56. # overwriting linux binaries as we go...
  57. ${INSTALL_PROGRAM} ${WRKBUILD}/${B} ${DATA}
  58. echo "#!/bin/sh\ncd ${TRUEDATA} && ./${B:T} \"\$$@\"\n" \
  59. > ${PREFIX}/bin/${B:T}
  60. chown ${BINOWN}:${BINGRP} ${PREFIX}/bin/${B:T}
  61. chmod +x ${PREFIX}/bin/${B:T}
  62. .endfor
  63. NO_TEST = Yes
  64. .include <bsd.port.mk>