circlemud-3.1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 multi-user dungeon game system server"
  6. HOMEPAGE="http://www.circlemud.org/"
  7. SRC_URI="http://www.circlemud.org/pub/CircleMUD/3.x/circle-${PV}.tar.bz2"
  8. LICENSE="circlemud"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE=""
  12. DEPEND="dev-libs/openssl:0="
  13. RDEPEND=${DEPEND}
  14. S=${WORKDIR}/circle-${PV}
  15. src_prepare() {
  16. cd src
  17. touch .accepted
  18. sed -i \
  19. -e 's:^read.*::' licheck || die
  20. # make circlemud fit into Gentoo nicely
  21. sed -i \
  22. -e "s:\"lib\":\"${GAMES_DATADIR}/${PN}\":g" \
  23. -e "s:\(LOGNAME = \)NULL:\1\"${GAMES_LOGDIR}/${PN}.log\":g" \
  24. config.c || die
  25. sed -i \
  26. -e "s:etc/:${GAMES_SYSCONFDIR}/${PN}/:g" db.h || die
  27. # now lets rename binaries (too many are very generic)
  28. sed -i \
  29. -e "s:\.\./bin/autowiz:${PN}-autowiz:" limits.c || die
  30. epatch "${FILESDIR}"/${P}-ldflags.patch
  31. }
  32. src_compile() {
  33. emake -C src
  34. }
  35. src_install() {
  36. local bin
  37. for bin in autowiz delobjs listrent mudpasswd play2to3 purgeplay \
  38. shopconv showplay sign split wld2html ; do
  39. newgamesbin bin/${bin} ${PN}-${bin}
  40. done
  41. dogamesbin bin/circle
  42. dodir "${GAMES_DATADIR}/${PN}"
  43. cp -r lib/* "${D}/${GAMES_DATADIR}/${PN}" || die
  44. insinto "${GAMES_SYSCONFDIR}/${PN}"
  45. doins lib/etc/*
  46. dodoc doc/{README.UNIX,*.pdf,*.txt} ChangeLog FAQ README release_notes.${PV}.txt
  47. prepgamesdirs
  48. fperms 770 "${GAMES_SYSCONFDIR}/${PN}/players"
  49. }