# $Id: Portfile,v 1.7 2005/09/07 11:25:12 mww Exp $

PortSystem 1.0
name		man2html
version		3.0.1
revision	1
categories	textproc
maintainers	mij@opendarwin.org
description	Convert nroff man pages to HTML
homepage	http://www.oac.uci.edu/indiv/ehood/man2html.html
platforms	darwin

long_description man2html is a utility to convert UNIX nroff manual \
		 pages into HTML format.

master_sites	http://www.oac.uci.edu/indiv/ehood/tar/ \
		ftp://ftp.gpad.ac.ru/pub/FreeBSD/distfiles/ \
		http://soupnazi.org/OSX/dports/distfiles/

distname	${portname}${portversion}
checksums	md5 1c0d28c83225d0ebc845f2386c8f8384

patchfiles	patch-man.cgi

configure	{}

post-configure	{ reinplace "s|/usr/local/bin/perl|/usr/bin/perl|" \
		    ${worksrcpath}/man2html
		  reinplace "s|/usr/local/bin/perl|/usr/bin/perl|" \
		    ${worksrcpath}/man.cgi }

build		{}

destroot	{ xinstall -m 755 -d ${destroot}${prefix}/bin \
		    ${destroot}${prefix}/share/man/man1 \
		    ${destroot}${prefix}/www/cgi-bin
		  xinstall -m 755 ${worksrcpath}/man2html ${destroot}${prefix}/bin
		  xinstall -m 644 ${worksrcpath}/doc/man2html.1 \
		    ${destroot}${prefix}/share/man/man1
		  xinstall -m 755 ${worksrcpath}/man.cgi \
		    ${destroot}${prefix}/www/cgi-bin }
