# $Id: Portfile,v 1.8 2005/06/23 17:11:30 mij Exp $

PortSystem 1.0
name		whois
version		4.7.5
categories	net
maintainers	mij@opendarwin.org
description	A replacement whois client
homepage	http://www.linux.it/~md/software/
platforms	darwin

long_description whois is an improved whois client that follow the \
		 delegations from the Verisign whois server.

master_sites	http://ftp.debian.org/debian/pool/main/w/${portname}

checksums	md5 c6657a888a20bd5d5915de6ba18599c8

distname	${portname}_${portversion}

worksrcdir	${portname}-${portversion}

depends_lib	lib:libintl.3:gettext

configure	{}

post-configure	{ reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile
		  reinplace "s|/etc|${prefix}/etc|g" ${worksrcpath}/config.h
		  reinplace "s|\$(BASEDIR)/usr|${destroot}${prefix}|g" \
		    ${worksrcpath}/po/Makefile
		  reinplace "s|/etc/whois.conf|${prefix}/etc/whois.conf|g" \
		    ${worksrcpath}/whois.1 }

build.env	CFLAGS="-DENABLE_NLS -I${prefix}/include" \
		LDFLAGS="-L${prefix}/lib -lintl"

destroot.args	prefix=${destroot}${prefix}
