|
|
# 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 | inherit eutils python games |
| |
DESCRIPTION="Clone of the famous Scotland Yard board game" | DESCRIPTION="Clone of the famous Scotland Yard board game" |
HOMEPAGE="http://www.eecs.umich.edu/~pelzlpj/londonlaw/" |
HOMEPAGE="http://pessimization.com/software/londonlaw/" |
SRC_URI="http://www.eecs.umich.edu/~pelzlpj/londonlaw/${P}.tar.gz" |
SRC_URI="http://pessimization.com/software/londonlaw/${P}.tar.gz" |
| |
LICENSE="GPL-2" | LICENSE="GPL-2" |
SLOT="0" | SLOT="0" |
KEYWORDS="amd64 ppc x86" |
KEYWORDS="~amd64 ~ppc ~x86" |
IUSE="" |
IUSE="dedicated" |
| |
DEPEND=">=dev-lang/python-2.3 | DEPEND=">=dev-lang/python-2.3 |
=dev-python/wxpython-2.6* |
!dedicated? ( =dev-python/wxpython-2.6* ) |
dev-python/twisted" | dev-python/twisted" |
| |
src_unpack() { | src_unpack() { |
|
|
cd "${S}" | cd "${S}" |
epatch "${FILESDIR}/${P}-setup.py.patch" | epatch "${FILESDIR}/${P}-setup.py.patch" |
epatch "${FILESDIR}"/${P}-wxversion.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() { | src_install() { |
|
|
--install-data="${GAMES_DATADIR}" \ | --install-data="${GAMES_DATADIR}" \ |
|| die "install failed" | || die "install failed" |
dodoc ChangeLog README | 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 | prepgamesdirs |
} | } |
| |
pkg_postinst() { | pkg_postinst() { |
games_pkg_postinst | games_pkg_postinst |
echo |
if ! use dedicated ; then |
elog "To play, first start the server (london-server), then connect" |
echo |
elog "with the client (london-client). At least two players are" |
elog "To play, first start the server (london-server), then connect" |
elog "needed to play." |
elog "with the client (london-client). At least two players are" |
echo |
elog "needed to play." |
|
echo |
|
fi |
} | } |