# $Id: Portfile,v 1.11 2004/04/27 18:35:58 matt Exp $

PortSystem 1.0
name		larn
version		4.6.2-RELEASE
revision	1
categories	games
maintainers	eric@opendarwin.org
description	Text-based cavern exploring game
platforms	darwin
use_bzip2	yes
master_sites	opendarwin
checksums	md5 cea96f48caa057793f6bcaf3394ca388
build.type	bsd
build.args	LDADD+=-L${prefix}/lib\\ -lcompat\\ -lncurses
worksrcdir	${portname}
patchfiles	patch-io.c

configure	{ reinplace "s|MAN|MAN6|" ${worksrcpath}/Makefile
		  reinplace "s|/usr/share|${prefix}/share|g" \
		    ${worksrcpath}/pathnames.h
		  reinplace "s|/var/games|${prefix}/var/games|g" \
		    ${worksrcpath}/pathnames.h }

destroot	{ cd ${worksrcpath}
		  system "install -o root -m 755 -d ${destroot}${prefix}/var/games/larn"
		  system "install -o root -m 755 -d ${destroot}${prefix}/share/man/man6"
		  system "install -o root -m 755 -d ${destroot}${prefix}/share/games/larn"
		  system "install -o root -m 755 -c larn ${destroot}${prefix}/bin"
		  system "install -o root -m 644 -c larn.6.gz  \
		    ${destroot}${prefix}/share/man/man6"
		  cd datfiles
		  system "install -o root -m 644 -c larn.help \
		    ${destroot}${prefix}/share/games/larn"
		  system "install -o root -m 644 -c larnmaze \
		    ${destroot}${prefix}/share/games/larn" }

