# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games flag-o-matic MY_P="400b26" S="${WORKDIR}/dc${MY_P}-src" SLOT="0" LICENSE="crawl" KEYWORDS="~x86 ~amd64" # possibly others too, but haven't been able to test. DESCRIPTION="A free and portable roguelike molded in the tradition of the \ early greats of the genre." SRC_URI="ftp://ftp.dungeoncrawl.org/dev/4.0.x/src/dc${MY_P}-src.tbz2" HOMEPAGE="http://www.dungeoncrawl.org/" DEPEND="sys-libs/ncurses" RDEPEND="sys-libs/ncurses app-arch/zip app-arch/unzip" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/dungeon-crawl-patch.patch || die sed "s#/opt/crawl/lib#${GAMES_STATEDIR}/crawl#g" source/AppHdr.h > \ source/AppHdr.h.bak mv source/AppHdr.h.bak source/AppHdr.h } src_compile() { cd source if use debug then append-flags -DFULLDEBUG -DWIZARD fi emake -f makefile.lnx } src_install() { dogamesbin source/crawl dodoc docs/*.txt docs/changes.* doman docs/crawl.6 dodir ${GAMES_STATEDIR}/crawl cp macro.txt init.txt ${D}/${GAMES_STATEDIR}/crawl insinto /etc/env.d doins ${FILESDIR}/90crawl.env 90crawl prepgamesdirs } pkg_postinst() { games_pkg_postinst chmod g+w ${GAMES_STATEDIR}/crawl } pkg_postrm() { ewarn "Any saved games, bones files, etc. will not have been removed" ewarn "in this process. To get rid of Crawl completely, you will need" ewarn "to remove the ${GAMES_STATEDIR}/crawl directory manually." }