# $Id: Portfile,v 1.5 2005/11/17 19:07:09 fenner Exp $

PortSystem 1.0
name		xml2rfc
version		1.30
categories	textproc
maintainers	fenner@research.att.com
description	RFC formatting utility using XML source
long_description	\
	xml2rfc is a tool for creating Internet-Drafts and RFCs \
	using the format described in RFC 2629.
homepage	http://xml.resource.org/
master_sites	http://xml.resource.org/authoring/
extract.suffix	.tgz
checksums	md5 dc4d3045a66716fc78bdf96d8ede61f1
depends_build	bin:unzip:unzip
patchfiles	fast-sync.sh.diff

configure	{}
build		{
	system "cd ${worksrcpath}; unzip rfc2629xslt"
}
destroot	{
	xinstall -m 755 ${worksrcpath}/xml2rfc.tcl \
		${destroot}${prefix}/bin/xml2rfc
	system "ln -s xml2rfc ${destroot}${prefix}/bin/xml2html; \
		ln -s xml2rfc ${destroot}${prefix}/bin/xml2txt; \
		ln -s xml2rfc ${destroot}${prefix}/bin/xml2nroff"
	xinstall -d ${destroot}${prefix}/share/doc/xml2rfc
	foreach file [glob -directory ${worksrcpath} \
			"README.*" "draft-mrose-writing-rfcs.*" "rfc2629.*" \
			"sample.*"] {
		xinstall -m 644 ${file} \
			${destroot}${prefix}/share/doc/xml2rfc/
	}
	xinstall -d ${destroot}${prefix}/share/xsl/xml2rfc
	foreach file [glob -directory ${worksrcpath}/rfc2629xslt \
			"*"] {
		xinstall -m 644 ${file} \
			${destroot}${prefix}/share/xsl/xml2rfc/
	}
}
