Portfile

# $Id: Portfile 20295 2006-11-01 18:22:31Z blair@macports.org $

PortSystem 1.0
name moria
version 5.5.2
categories games
maintainers aschenke@tampabay.rr.com
description Moria is a Rogue-like dungeon exploration game
long_description Moria is a Rogue-like dungeon exploration game similar to Angband.
homepage http://www-math.bgsu.edu/~grabine/moria.html
master_sites http://www.nic.funet.fi/pub/unix/games/${name}/source/
checksums md5 04a2852864302c702e82992023d97184
extract.suffix .tar.Z
distname um${version}
worksrcdir umoria

patchfiles patch-source_config.h

configure {
addgroup games

cd ${worksrcpath}
file copy unix/Makefile source
file copy unix/unix.c source

reinplace "s|/home/math/grabiner/moria/files|${prefix}/var/games/moria|" \
source/config.h
}

build {
system "cd ${worksrcpath}/source && make"
}

destroot {
xinstall -d 755 ${destroot}${prefix}/var/games/moria
xinstall -c -m 2755 -g games ${worksrcpath}/source/moria ${destroot}${prefix}/bin
xinstall -c -m 444 ${worksrcpath}/files/hours ${destroot}${prefix}/var/games/moria
xinstall -c -m 444 ${worksrcpath}/files/news ${destroot}${prefix}/var/games/moria
xinstall -c -m 644 ${worksrcpath}/files/origcmds.hlp ${destroot}${prefix}/var/games/moria
xinstall -c -m 644 ${worksrcpath}/files/owizcmds.hlp ${destroot}${prefix}/var/games/moria
xinstall -c -m 644 ${worksrcpath}/files/roglcmds.hlp ${destroot}${prefix}/var/games/moria
xinstall -c -m 644 ${worksrcpath}/files/rwizcmds.hlp ${destroot}${prefix}/var/games/moria
xinstall -c -m 464 -g games ${worksrcpath}/files/scores ${destroot}${prefix}/var/games/moria
xinstall -c -m 644 ${worksrcpath}/files/version.hlp ${destroot}${prefix}/var/games/moria
xinstall -c -m 644 ${worksrcpath}/files/welcome.hlp ${destroot}${prefix}/var/games/moria
}

files