summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <nyhm@gentoo.org>2007-04-05 01:46:12 +0000
committerTristan Heaven <nyhm@gentoo.org>2007-04-05 01:46:12 +0000
commit33c2d2c67984e3e7f24a2491c12b92a90ea136e2 (patch)
treeecc6e89d9dbb71795729ff93693122dd70d37182 /games-rpg/dragonhunt
parentuse games_get_libdir (diff)
downloadgentoo-2-33c2d2c67984e3e7f24a2491c12b92a90ea136e2.tar.gz
gentoo-2-33c2d2c67984e3e7f24a2491c12b92a90ea136e2.tar.bz2
gentoo-2-33c2d2c67984e3e7f24a2491c12b92a90ea136e2.zip
use games_get_libdir
(Portage version: 2.1.2.3)
Diffstat (limited to 'games-rpg/dragonhunt')
-rw-r--r--games-rpg/dragonhunt/dragonhunt-3.55.ebuild48
1 files changed, 18 insertions, 30 deletions
diff --git a/games-rpg/dragonhunt/dragonhunt-3.55.ebuild b/games-rpg/dragonhunt/dragonhunt-3.55.ebuild
index 74125cad13ac..e06ca26219b3 100644
--- a/games-rpg/dragonhunt/dragonhunt-3.55.ebuild
+++ b/games-rpg/dragonhunt/dragonhunt-3.55.ebuild
@@ -1,33 +1,30 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-rpg/dragonhunt/dragonhunt-3.55.ebuild,v 1.1 2006/11/06 21:33:42 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/dragonhunt/dragonhunt-3.55.ebuild,v 1.2 2007/04/05 01:46:12 nyhm Exp $
inherit games
-MY_PN="Dragon_Hunt"
-
+MY_P="Dragon_Hunt-${PV}"
DESCRIPTION="A simple graphical RPG."
HOMEPAGE="http://emhsoft.com/dh.html"
-SRC_URI="http://emhsoft.com/dh/${MY_PN}-${PV}.tar.gz"
+SRC_URI="http://emhsoft.com/dh/${MY_P}.tar.gz"
+
LICENSE="GPL-2 CCPL-ShareAlike-1.0"
SLOT="0"
-
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="dev-lang/python
dev-python/pygame"
-S="${WORKDIR}/${MY_PN}-${PV}"
-MODULE_DIR="${GAMES_DATADIR}/${PN}/"
-LIB_DIR="${GAMES_LIBDIR}/${PN}"
+S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${A}
cd ${S}
# Where to look for modules to load.
- sed -i -e "s:\.\./modules/:${MODULE_DIR}:" \
+ sed -i -e "s:\.\./modules/:${GAMES_DATADIR}/${PN}/:" \
code/g.py \
code/map_editor.py \
code/rpg.py \
@@ -51,29 +48,20 @@ src_unpack() {
-e "s:g.mod_dir.*\"map\.txt\":environ[\"HOME\"]\ +\ \"/dh_map.txt\":" \
code/map_editor.py \
|| die "Could not change map location."
-
- # Make the launch scripts look in the right place for the code.
- sed -i \
- -e '/^tempname/d' \
- -e "s:^cd.*:cd ${LIB_DIR}:" \
- Dragon_Hunt_Linux Map_Editor \
- || die "Could not change launch location."
}
src_install() {
- insinto ${MODULE_DIR}
- doins -r modules/*
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r modules/* || die "doins modules failed"
- insinto ${GAMES_SYSCONFDIR}/${PN}
- doins settings.txt
+ insinto "${GAMES_SYSCONFDIR}"/${PN}
+ doins settings.txt || die "doins settings.txt failed"
- # Install the code for running the game, the compiled python isn't included
- # as I cannot safely change the directory paths in it.
- insinto ${LIB_DIR}
- doins code/*.py
+ insinto "$(games_get_libdir)"/${PN}
+ doins code/*.py || die "doins code failed"
- newgamesbin Dragon_Hunt_Linux ${PN}
- newgamesbin Map_Editor ${PN}-mapeditor
+ games_make_wrapper ${PN} "python ./rpg.py" "$(games_get_libdir)"/${PN}
+ games_make_wrapper ${PN}-mapeditor "python ./map_editor.py" "$(games_get_libdir)"/${PN}
dodoc README.txt docs/{Changelog,Items.txt,example_map.txt,tiles.txt}
dohtml docs/*.html
@@ -83,8 +71,8 @@ src_install() {
pkg_postinst() {
games_pkg_postinst
echo
- einfo "If you use the map editor then note that maps will be saved as"
- einfo "~/dh_map.txt and must be move to the correct module directory"
- einfo "(within ${MODULE_DIR}) by hand."
+ elog "If you use the map editor then note that maps will be saved as"
+ elog "~/dh_map.txt and must be move to the correct module directory"
+ elog "(within ${GAMES_DATADIR}/${PN}) by hand."
echo
}