cs2d-0127.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils games
  5. DESCRIPTION="A freeware clone of Counter-Strike with some added features in gameplay"
  6. HOMEPAGE="http://www.cs2d.com/"
  7. SRC_URI="https://dev.gentoo.org/~maksbotan/cs2d/cs2d_${PV}_linux.zip
  8. https://dev.gentoo.org/~maksbotan/cs2d/cs2d_${PV}_win.zip
  9. https://dev.gentoo.org/~maksbotan/cs2d/cs2d.png"
  10. LICENSE="freedist"
  11. SLOT="0"
  12. KEYWORDS="-* ~amd64 ~x86"
  13. IUSE=""
  14. DEPEND="app-arch/unzip"
  15. RDEPEND="
  16. x86? (
  17. media-libs/openal
  18. media-libs/freetype:2
  19. x11-libs/libX11
  20. x11-libs/libXxf86vm
  21. virtual/opengl
  22. )
  23. amd64? (
  24. >=media-libs/openal-1.15.1[abi_x86_32(-)]
  25. >=virtual/opengl-7.0-r1[abi_x86_32(-)]
  26. >=media-libs/freetype-2.5.0.1:2[abi_x86_32(-)]
  27. >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
  28. >=x11-libs/libXxf86vm-1.1.3[abi_x86_32(-)]
  29. )"
  30. QA_PREBUILT="opt/cs2d/CounterStrike2D"
  31. S=${WORKDIR}
  32. src_prepare() {
  33. # removing windows files
  34. rm -f *.exe *.bat || die
  35. # OpenAL is default sound driver
  36. sed -i \
  37. -e 's:^sounddriver.*$:sounddriver OpenAL Default:' \
  38. sys/config.cfg || die
  39. }
  40. src_install() {
  41. insinto "${GAMES_PREFIX_OPT}"/${PN}
  42. doins -r .
  43. # avoid file collision with untracked file
  44. rm -f "${ED%/}/${GAMES_PREFIX_OPT}"/${PN}/sys/core/started.cfg
  45. make_desktop_entry CounterStrike2D "Counter Strike 2D"
  46. make_desktop_entry "CounterStrike2D -fullscreen -24bit" "Counter Strike 2D - FULLSCREEN"
  47. games_make_wrapper CounterStrike2D ./CounterStrike2D \
  48. "${GAMES_PREFIX_OPT}"/${PN} "${GAMES_PREFIX_OPT}"/${PN}
  49. doicon "${DISTDIR}"/${PN}.png
  50. prepgamesdirs
  51. # fixing permissions
  52. fperms -R g+w "${GAMES_PREFIX_OPT}"/${PN}/maps
  53. fperms -R g+w "${GAMES_PREFIX_OPT}"/${PN}/screens
  54. fperms -R g+w "${GAMES_PREFIX_OPT}"/${PN}/sys
  55. fperms ug+x "${GAMES_PREFIX_OPT}"/${PN}/CounterStrike2D
  56. }