cs2d-1002-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils
  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/freetype:2
  18. media-libs/openal
  19. x11-libs/libX11
  20. x11-libs/libXxf86vm
  21. virtual/opengl
  22. )
  23. amd64? (
  24. >=media-libs/freetype-2.5.0.1:2[abi_x86_32(-)]
  25. >=media-libs/openal-1.15.1[abi_x86_32(-)]
  26. >=virtual/opengl-7.0-r1[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. default
  34. # removing windows files
  35. rm -f *.exe *.bat || die
  36. # OpenAL is default sound driver
  37. sed -i \
  38. -e 's:^sounddriver.*$:sounddriver OpenAL Default:' \
  39. sys/config.cfg || die
  40. }
  41. src_install() {
  42. insinto /opt/${PN}
  43. doins -r .
  44. # avoid file collision with untracked file
  45. rm -f "${ED%/}/opt/${PN}/sys/core/started.cfg"
  46. make_desktop_entry CounterStrike2D "Counter Strike 2D"
  47. make_desktop_entry "CounterStrike2D -fullscreen -24bit" "Counter Strike 2D - FULLSCREEN"
  48. make_wrapper CounterStrike2D ./CounterStrike2D /opt/${PN} /opt/${PN}
  49. doicon "${DISTDIR}"/${PN}.png
  50. # fixing permissions
  51. fperms -R g+w /opt/${PN}/maps
  52. fperms -R g+w /opt/${PN}/screens
  53. fperms -R g+w /opt/${PN}/sys
  54. fperms o+x /opt/${PN}/CounterStrike2D
  55. }