# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 66228 2010-04-07 15:23:53Z snc@macports.org $

PortSystem 1.0

name		xml2rfc
version		1.35
categories	textproc
platforms	darwin
maintainers	fenner
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     7ffb973fee55318b1bd0fd77a903d2e6 \
                    sha1    d4b8582570b960b26a5959802e1f3d4937ef1616 \
                    rmd160  e13b66b885857fc2d372ef4b33ddef69cb8199d9
depends_build	bin:unzip:unzip
patchfiles	fast-sync.sh.diff

use_configure	    no
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.*" \
			"*.ent" "sample.*"] {
		xinstall -m 644 ${file} \
			${destroot}${prefix}/share/doc/xml2rfc/
	}
	xinstall -d ${destroot}${prefix}/share/xsl/xml2rfc
}
