--- /usr/portage/games-puzzle/londonlaw/londonlaw-0.2.1-r1.ebuild 2008-06-25 22:05:59.000000000 +0200 +++ londonlaw-0.2.1-r2.ebuild 2008-08-21 02:45:07.000000000 +0200 @@ -1,20 +1,16 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/londonlaw/londonlaw-0.2.1-r1.ebuild,v 1.4 2008/06/25 19:42:01 nixnut Exp $ - inherit eutils python games DESCRIPTION="Clone of the famous Scotland Yard board game" -HOMEPAGE="http://www.eecs.umich.edu/~pelzlpj/londonlaw/" -SRC_URI="http://www.eecs.umich.edu/~pelzlpj/londonlaw/${P}.tar.gz" +HOMEPAGE="http://pessimization.com/software/londonlaw/" +SRC_URI="http://pessimization.com/software/londonlaw/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ppc x86" -IUSE="" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="dedicated" DEPEND=">=dev-lang/python-2.3 - =dev-python/wxpython-2.6* + !dedicated? ( =dev-python/wxpython-2.6* ) dev-python/twisted" src_unpack() { @@ -22,6 +18,24 @@ cd "${S}" epatch "${FILESDIR}/${P}-setup.py.patch" epatch "${FILESDIR}"/${P}-wxversion.patch + if has_version '>=dev-python/twisted-2.3' ; then + sed -i \ + -e 's:import log:import log\nfrom zope import interface\n:' \ + -e 's:class IGameListener(components.Interface):class IGameListener(interface.Interface):' \ + londonlaw/server/Game.py \ + || die "sed failed" + fi + + if use dedicated ; then + rm "${S}/londonlaw/london-client" + rm "${S}/londonlaw/london-client.py" + rm -r "${S}/londonlaw/guiclient/" + sed -i \ + -e "s:'londonlaw.guiclient'::" \ + -e "s:'londonlaw/london-client'::" \ + setup.py \ + || die "sed failed" + fi } src_install() { @@ -33,14 +47,25 @@ --install-data="${GAMES_DATADIR}" \ || die "install failed" dodoc ChangeLog README + + if use dedicated ; then + newinitd "${FILESDIR}/londonlaw.rc" londonlaw + newconfd "${FILESDIR}/londonlaw.confd" londonlaw + insinto /var/log + newins /dev/null londonlaw.log + fowners games:users /var/log/londonlaw.log + fi + prepgamesdirs } pkg_postinst() { games_pkg_postinst - echo - elog "To play, first start the server (london-server), then connect" - elog "with the client (london-client). At least two players are" - elog "needed to play." - echo + if ! use dedicated ; then + echo + elog "To play, first start the server (london-server), then connect" + elog "with the client (london-client). At least two players are" + elog "needed to play." + echo + fi }