chickens-0.2.4-r1.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils user
  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. pkg_setup(){
  18. enewgroup gamestat 36
  19. }
  20. src_prepare() {
  21. default
  22. sed -i \
  23. -e "s:HighScores:/var/games//${PN}/HighScores:" \
  24. -e "s:....\(.\)\(_\)\(.*.4x0\)\(.\):M\4\2\x42\x6Fn\1s\2:" \
  25. highscore.cpp HighScores || die
  26. sed -i \
  27. -e "s:options.cfg:/etc/${PN}/options.cfg:" \
  28. -e "s:\"sound/:\"/usr/share/${PN}/sound/:" \
  29. -e "s:\"dat/:\"/usr/share/${PN}/dat/:" \
  30. main.cpp README || die
  31. sed -i \
  32. -e '/^CPPFLAGS/d' \
  33. -e 's:g++:\\$(CXX) \\$(CXXFLAGS) \\$(LDFLAGS):' \
  34. configure || die
  35. }
  36. src_configure() {
  37. # econf (sometimes) fails, see https://bugs.gentoo.org/588544
  38. bash ./configure || die
  39. }
  40. src_install() {
  41. dobin ${PN}
  42. insinto /usr/share/${PN}
  43. doins -r dat sound
  44. dodoc AUTHOR README
  45. insinto /var/games/${PN}
  46. doins HighScores
  47. insinto /etc/${PN}
  48. doins options.cfg
  49. make_desktop_entry ${PN} Chickens
  50. fowners root:gamestat /usr/bin/${PN} /var/games/${PN}/HighScores
  51. fperms 2755 /usr/bin/${PN}
  52. fperms 660 /var/games/${PN}/HighScores
  53. }