quake2-demodata-3.14.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit unpacker eutils versionator games
  5. MY_PV=$(delete_all_version_separators)
  6. MY_PN="quake2"
  7. FILE="q2-${MY_PV}-demo-x86.exe"
  8. DESCRIPTION="Demo data for Quake 2"
  9. HOMEPAGE="http://en.wikipedia.org/wiki/Quake_II"
  10. SRC_URI="mirror://idsoftware/${MY_PN}/${FILE}"
  11. # See license.txt - it's a bit different to Q2EULA in Portage
  12. LICENSE="quake2-demodata"
  13. SLOT="0"
  14. KEYWORDS="~alpha amd64 ~ia64 ppc sparc x86 ~x86-fbsd"
  15. IUSE="symlink"
  16. RDEPEND=""
  17. DEPEND="app-arch/unzip
  18. !games-fps/quake2-data" # games-fps/quake2-data already includes the demo data
  19. S=${WORKDIR}
  20. dir=${GAMES_DATADIR}/${MY_PN}
  21. src_unpack() {
  22. unpack_zip ${A}
  23. }
  24. src_install() {
  25. insinto "${dir}"/demo
  26. doins -r Install/Data/baseq2/{pak0.pak,players}
  27. dodoc Install/Data/DOCS/*.txt
  28. if use symlink ; then
  29. # Make the demo the default, so that people can just run it,
  30. # without having to mess with command-line options.
  31. cd "${D}/${dir}" && ln -sfn demo baseq2
  32. fi
  33. prepgamesdirs
  34. }
  35. pkg_postinst() {
  36. games_pkg_postinst
  37. elog "This is just the demo data. To play, install a client"
  38. elog "such as games-fps/qudos"
  39. echo
  40. if use symlink ; then
  41. elog "baseq2 has been symlinked to demo, for convenience, within:"
  42. elog "${dir}"
  43. echo
  44. fi
  45. }