# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       xmlcatalog 1.0

name            docbook-dsssl
version         1.79
revision        3
categories      textproc
license         MIT
description     The docbook DSSSL stylesheets
long_description {*}${description}
platforms       any
maintainers     nomaintainer
supported_archs noarch
master_sites    sourceforge:docbook
homepage        http://docbook.sf.net/
checksums       md5 8459913bbd8a5724a6fe4b9ed5bab5af
use_configure   no

set things_to_install [list common contrib dtds frames html images lib olink print catalog VERSION]

set install_dir ${prefix}/share/dsssl/${name}
sgml.catalog ${install_dir}/catalog

build {}

destroot {
    # Docs
    xinstall -m 755 -d ${destroot}${install_dir} \
        ${destroot}${prefix}/share/doc/${name} \
        ${destroot}${prefix}/share/${name}
    
    # bin
    xinstall -m 755 -W ${worksrcpath} bin/collateindex.pl \
        ${destroot}${prefix}/bin
    # man
    xinstall -m 644 -W ${worksrcpath} bin/collateindex.pl.1 \
        ${destroot}${prefix}/share/man/man1

    # everything else
    xinstall -m 644 -W ${worksrcpath} BUGS ChangeLog README \
        RELEASE-NOTES.html RELEASE-NOTES.xml RELEASE-NOTES.txt WhatsNew \
        ${destroot}${prefix}/share/doc/${name}
    foreach dirname $things_to_install {
        file copy ${worksrcpath}/${dirname} ${destroot}${install_dir}
    }
}
