diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2008-08-24 06:36:05 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2008-08-24 06:36:05 +0000 |
commit | 03ed486828ca7b0eba6c5821510c5fe72607ec33 (patch) | |
tree | 4c8205ba50b1cf55d4ade202e2e07df680883b3c /games-puzzle | |
parent | Version bump (#235559) (diff) | |
download | gentoo-2-03ed486828ca7b0eba6c5821510c5fe72607ec33.tar.gz gentoo-2-03ed486828ca7b0eba6c5821510c5fe72607ec33.tar.bz2 gentoo-2-03ed486828ca7b0eba6c5821510c5fe72607ec33.zip |
dedicated support and sed patch from mattenklicker@gmx.net via bug #235326
(Portage version: 2.1.4.4)
Diffstat (limited to 'games-puzzle')
-rw-r--r-- | games-puzzle/londonlaw/ChangeLog | 8 | ||||
-rw-r--r-- | games-puzzle/londonlaw/files/londonlaw.confd | 2 | ||||
-rw-r--r-- | games-puzzle/londonlaw/files/londonlaw.rc | 21 | ||||
-rw-r--r-- | games-puzzle/londonlaw/londonlaw-0.2.1-r2.ebuild | 84 |
4 files changed, 114 insertions, 1 deletions
diff --git a/games-puzzle/londonlaw/ChangeLog b/games-puzzle/londonlaw/ChangeLog index b5f030217bba..eeedad846f74 100644 --- a/games-puzzle/londonlaw/ChangeLog +++ b/games-puzzle/londonlaw/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-puzzle/londonlaw # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/londonlaw/ChangeLog,v 1.13 2008/06/25 19:42:01 nixnut Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-puzzle/londonlaw/ChangeLog,v 1.14 2008/08/24 06:36:05 mr_bones_ Exp $ + +*londonlaw-0.2.1-r2 (24 Aug 2008) + + 24 Aug 2008; Michael Sterrett <mr_bones_@gentoo.org> + +files/londonlaw.confd, +files/londonlaw.rc, +londonlaw-0.2.1-r2.ebuild: + dedicated support and sed patch from mattenklicker@gmx.net via bug #235326 25 Jun 2008; nixnut <nixnut@gentoo.org> londonlaw-0.2.1-r1.ebuild: Stable on ppc wrt bug 229307 diff --git a/games-puzzle/londonlaw/files/londonlaw.confd b/games-puzzle/londonlaw/files/londonlaw.confd new file mode 100644 index 000000000000..083798b3252b --- /dev/null +++ b/games-puzzle/londonlaw/files/londonlaw.confd @@ -0,0 +1,2 @@ +#run londonlaw on port 7921 (default) +LONDONLAW_PORT="7921" diff --git a/games-puzzle/londonlaw/files/londonlaw.rc b/games-puzzle/londonlaw/files/londonlaw.rc new file mode 100644 index 000000000000..9626a3d61a7d --- /dev/null +++ b/games-puzzle/londonlaw/files/londonlaw.rc @@ -0,0 +1,21 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting londonlaw server" + start-stop-daemon --start --pidfile /var/run/london-server.pid \ + --user GAMES_USER_DED --background --stdout /var/log/londonlaw.log \ + --stderr /var/log/londonlaw.log --make-pidfile \ + --exec GAMES_BINDIR/london-server -- -p $LONDONLAW_PORT + eend $? +} + +stop() { + ebegin "Stopping londonlaw server" + start-stop-daemon --stop --pidfile /var/run/london-server.pid \ + --exec GAMES_BINDIR/london-server + eend $? +} diff --git a/games-puzzle/londonlaw/londonlaw-0.2.1-r2.ebuild b/games-puzzle/londonlaw/londonlaw-0.2.1-r2.ebuild new file mode 100644 index 000000000000..698826c9eded --- /dev/null +++ b/games-puzzle/londonlaw/londonlaw-0.2.1-r2.ebuild @@ -0,0 +1,84 @@ +# 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-r2.ebuild,v 1.1 2008/08/24 06:36:05 mr_bones_ Exp $ + +EAPI=1 +inherit eutils python games + +DESCRIPTION="Clone of the famous Scotland Yard board game" +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="dedicated" + +DEPEND=">=dev-lang/python-2.3 + !dedicated? ( dev-python/wxpython:2.6 ) + dev-python/twisted" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch \ + "${FILESDIR}"/${P}-setup.py.patch \ + "${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 + local f + rm -r londonlaw/{london-client,london-client.py,guiclient/} + sed -i \ + -e "s:'londonlaw.guiclient'::" \ + -e "s:'londonlaw/london-client'::" \ + setup.py \ + || die "sed failed" + for f in londonlaw.rc londonlaw.confd + do + sed \ + -e "s/GAMES_USER_DED/${GAMES_USER_DED}/" \ + -e "s:GAMES_BINDIR:${GAMES_BINDIR}:" \ + "${FILESDIR}/${f}" > "${T}/${f}" \ + || die "sed failed" + done + fi +} + +src_install() { + python_version + python setup.py install \ + --root="${D}" \ + --prefix="${GAMES_PREFIX}" \ + --install-lib=/usr/lib/python${PYVER}/site-packages \ + --install-data="${GAMES_DATADIR}" \ + || die "install failed" + dodoc ChangeLog README + + if use dedicated ; then + newinitd "${T}/londonlaw.rc" londonlaw + newconfd "${T}/londonlaw.confd" londonlaw + insinto /var/log + newins /dev/null londonlaw.log + fowners ${GAMES_USER_DED}:${GAMES_GROUP} /var/log/londonlaw.log + fi + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + 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 +} |