summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-02-26 07:24:10 +0000
committerMike Frysinger <vapier@gentoo.org>2004-02-26 07:24:10 +0000
commite180ef9f8d77ef0c984b6a27384f681a914a6426 (patch)
treec2c05acb1ce4b8418cb7afc805b79e36a3d4c61c /games-puzzle/drod-bin/drod-bin-1.6.5.ebuild
parentinclude -mtune in the list (diff)
downloadhistorical-e180ef9f8d77ef0c984b6a27384f681a914a6426.tar.gz
historical-e180ef9f8d77ef0c984b6a27384f681a914a6426.tar.bz2
historical-e180ef9f8d77ef0c984b6a27384f681a914a6426.zip
backup saved games #42836
Diffstat (limited to 'games-puzzle/drod-bin/drod-bin-1.6.5.ebuild')
-rw-r--r--games-puzzle/drod-bin/drod-bin-1.6.5.ebuild29
1 files changed, 21 insertions, 8 deletions
diff --git a/games-puzzle/drod-bin/drod-bin-1.6.5.ebuild b/games-puzzle/drod-bin/drod-bin-1.6.5.ebuild
index e55fe9c54486..884fcbcf22a9 100644
--- a/games-puzzle/drod-bin/drod-bin-1.6.5.ebuild
+++ b/games-puzzle/drod-bin/drod-bin-1.6.5.ebuild
@@ -1,10 +1,9 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/drod-bin/drod-bin-1.6.5.ebuild,v 1.2 2004/02/17 15:38:00 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/drod-bin/drod-bin-1.6.5.ebuild,v 1.3 2004/02/26 07:24:10 vapier Exp $
inherit games eutils
-S="${WORKDIR}"
DESCRIPTION="Deadly Rooms Of Death: face room upon room of deadly things, armed with only your sword and your wits"
HOMEPAGE="http://www.drod.net/"
SRC_URI="mirror://sourceforge/drod/CDROD-${PV}-setup.sh.bin"
@@ -12,7 +11,6 @@ SRC_URI="mirror://sourceforge/drod/CDROD-${PV}-setup.sh.bin"
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="-* x86"
-IUSE=""
RDEPEND="virtual/x11
dev-libs/expat
@@ -20,16 +18,31 @@ RDEPEND="virtual/x11
media-libs/libsdl
>=media-libs/sdl-ttf-2.0.6"
+S=${WORKDIR}
+
src_unpack() {
unpack_makeself ${A}
cd ${S}
- epatch "${FILESDIR}/install.patch"
+ epatch ${FILESDIR}/install.patch
}
src_install() {
- ./install.sh -R "${D}" -g -rl -pg -I || die "install.sh failed"
- dodir "${GAMES_BINDIR}" || die "dodir failed"
- dosym /opt/drod/bin/drod "${GAMES_BINDIR}/drod" || die "dosym failed"
+ ./install.sh -R "${D}" -g -rl -pg -I || die "install.sh failed"
+ dodir ${GAMES_BINDIR}
+ dosym /opt/drod/bin/drod ${GAMES_BINDIR}/drod
prepgamesdirs
- fperms 775 /opt/drod/bin/Data/ || die "fperms failed"
+ fperms 770 /opt/drod/bin/Data
+}
+
+pkg_preinst() {
+ if [ -d ${ROOT}/opt/drod/bin/Data ] ; then
+ mv ${ROOT}/opt/drod/bin/Data{,.backup} || die "failed to backup data"
+ fi
+}
+
+pkg_postinst() {
+ if [ -d ${ROOT}/opt/drod/bin/Data.backup ] ; then
+ ewarn "Your saved games have been backed up to"
+ ewarn "/opt/drod/bin/Data.backup"
+ fi
}