rtcwmp-demo-1.1-r1.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils unpacker games
  5. MY_P="wolfmpdemo-linux-${PV}-MP.x86.run"
  6. DESCRIPTION="Return to Castle Wolfenstein - Multi-player demo"
  7. HOMEPAGE="http://games.activision.com/games/wolfenstein/"
  8. SRC_URI="mirror://idsoftware/wolf/linux/old/${MY_P}
  9. mirror://3dgamers/returnwolfenstein/${MY_P}"
  10. LICENSE="RTCW GPL-2" # gpl for init script bug #425946
  11. SLOT="0"
  12. KEYWORDS="-* amd64 x86"
  13. IUSE="dedicated"
  14. RESTRICT="strip mirror"
  15. RDEPEND="sys-libs/glibc
  16. amd64? ( sys-libs/glibc[multilib] )
  17. dedicated? ( app-misc/screen )
  18. !dedicated? (
  19. virtual/opengl
  20. x11-libs/libX11
  21. x11-libs/libXext
  22. )"
  23. QA_PREBUILT="${GAMES_PREFIX_OPT:1}/{PN}/*
  24. ${GAMES_PREFIX_OPT:1}/{PN}/demomain/*"
  25. S=${WORKDIR}
  26. dir=${GAMES_PREFIX_OPT}/${PN}
  27. Ddir=${D}/${dir}
  28. src_install() {
  29. insinto "${dir}"
  30. doins -r demomain Docs
  31. doins WolfMP.xpm
  32. dodoc CHANGES QUICKSTART
  33. exeinto "${dir}"
  34. doexe bin/x86/wolfded.x86 openurl.sh
  35. games_make_wrapper rtcwmp-demo-ded ./wolfded.x86 "${dir}" "${dir}"
  36. newinitd "${FILESDIR}"/rtcwmp-demo-ded.rc rtcwmp-demo-ded
  37. sed "s:GENTOO_DIR:${dir}:" "${ED}"/etc/init.d/rtcwmp-demo-ded || die
  38. if ! use dedicated; then
  39. doexe bin/x86/wolf.x86
  40. games_make_wrapper rtcwmp-demo ./wolf.x86 "${dir}" "${dir}"
  41. newicon WolfMP.xpm rtcwmp-demo.xpm
  42. make_desktop_entry rtcwmp-demo "Return to Castle Wolfenstein (MP demo)" \
  43. rtcwmp-demo.xpm
  44. fi
  45. prepgamesdirs
  46. }
  47. pkg_postinst() {
  48. games_pkg_postinst
  49. elog "Install 'rtcwsp-demo' for single-player"
  50. elog
  51. if ! use dedicated; then
  52. elog "Run 'rtcwmp-demo' for multi-player"
  53. elog
  54. fi
  55. elog "Start a dedicated server with"
  56. elog "'/etc/init.d/rtcwmp-demo-ded start'"
  57. elog
  58. elog "Start the server at boot with"
  59. elog "'rc-update add rtcwmp-demo-ded default'"
  60. }