chickens-0.2.4.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils games
  5. MY_P="ChickensForLinux-Linux-${PV}"
  6. DESCRIPTION="Target chickens with rockets and shotguns. Funny"
  7. HOMEPAGE="http://www.chickensforlinux.com/"
  8. SRC_URI="http://www.chickensforlinux.com/${MY_P}.tar.gz"
  9. LICENSE="all-rights-reserved"
  10. SLOT="0"
  11. KEYWORDS="amd64 ppc x86"
  12. IUSE=""
  13. RESTRICT="mirror bindist"
  14. DEPEND="<media-libs/allegro-5"
  15. RDEPEND="${DEPEND}"
  16. S=${WORKDIR}/${PN}
  17. src_prepare() {
  18. sed -i \
  19. -e "s:HighScores:${GAMES_STATEDIR}/${PN}/HighScores:" \
  20. -e "s:....\(.\)\(_\)\(.*.4x0\)\(.\):M\4\2\x42\x6Fn\1s\2:" \
  21. highscore.cpp HighScores || die
  22. sed -i \
  23. -e "s:options.cfg:${GAMES_SYSCONFDIR}/${PN}/options.cfg:" \
  24. -e "s:\"sound/:\"${GAMES_DATADIR}/${PN}/sound/:" \
  25. -e "s:\"dat/:\"${GAMES_DATADIR}/${PN}/dat/:" \
  26. main.cpp README || die
  27. sed -i \
  28. -e '/^CPPFLAGS/d' \
  29. -e 's:g++:\\$(CXX) \\$(CXXFLAGS) \\$(LDFLAGS):' \
  30. configure || die
  31. }
  32. src_configure() {
  33. bash ./configure || die
  34. }
  35. src_install() {
  36. dogamesbin ${PN}
  37. insinto "${GAMES_DATADIR}"/${PN}
  38. doins -r dat sound
  39. dodoc AUTHOR README
  40. insinto "${GAMES_STATEDIR}"/${PN}
  41. doins HighScores
  42. insinto "${GAMES_SYSCONFDIR}"/${PN}
  43. doins options.cfg
  44. fperms g+w "${GAMES_STATEDIR}"/${PN}/HighScores
  45. make_desktop_entry ${PN} Chickens
  46. prepgamesdirs
  47. }