# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 66092 2010-04-06 03:28:36Z jmr@macports.org $

PortSystem      1.0

name            docbook-xml-5.0
version         [lindex [split $name -] 2]
categories      textproc
platforms       darwin
maintainers     nox openmaintainer
description     Version $version of the DocBook XML DTDs

long_description \
    Version $version of the DocBook XML DTDs, which provide a structured,\
    semantic markup format for books and documentation, especially for\
    computer hardware and software.


homepage        http://www.docbook.org/xml/$version/
master_sites    $homepage
distname        docbook-$version
use_zip         yes

checksums       md5     2411c19ed4fb141f3fa3d389fae40736 \
                sha1    49f274e67efdee771300cba4da1f3e4bc00be1ec \
                rmd160  3fc1b6a1c6f94b77223ad9139676d5b8d8f36786

depends_run     port:xmlcatmgr

if {[info exists supported_archs]} {
    supported_archs noarch
}
use_configure   no

build {}

set bookdir     ${prefix}/share/xml/docbook/${version}

destroot {
    xinstall -d $destroot[file dirname $bookdir]
    copy $worksrcpath $destroot$bookdir
}

post-activate {
    if {[catch {exec xmlcatmgr lookup $bookdir/catalog.xml}]} {
        system "xmlcatmgr add nextCatalog $bookdir/catalog.xml"
    }
}

livecheck.type  none
