# $Id: Portfile 77676 2011-04-08 18:49:02Z ryandesign@macports.org $

PortSystem          1.0

name                xmlstarlet
version             1.1.0
revision            1
categories          textproc
maintainers         nomaintainer
license             MIT

description         xml command line utilities
long_description    XMLStarlet is a set of command line utilities (tools) to \
                    transform, query, validate, and edit XML documents and \
                    files using simple set of shell commands in similar way it \
                    is done for text files with UNIX grep, sed, awk, diff, \
                    patch, join, etc utilities.

homepage            http://xmlstar.sourceforge.net
platforms           darwin
master_sites        sourceforge:xmlstar

checksums           sha1    d8b5976687681bf0fe80ddc01627939424485f6d \
                    rmd160  c3710b2c311cac6a1a340778cb36690c528fd0bf

depends_lib         port:libxml2 port:libxslt port:libiconv

patchfiles          patch-doc-xmlstarlet.1.diff

configure.args      --with-libxml-prefix=${prefix} \
                    --with-libxslt-prefix=${prefix} \
                    --with-libiconv-prefix=${prefix} \
                    --mandir=${prefix}/share/man \
                    --program-transform-name=s/xml$/${name}/

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS \
        COPYING \
        NEWS \
        README \
        TODO \
        doc/xmlstarlet-ug.pdf \
        doc/xmlstarlet.pdf \
        ${docdir}
}

notes "
Some ${name} documentation files refer to the program name as \"xml\" but\
in MacPorts the program is installed as \"${name}\".
"

livecheck.regex     <title>${name} (.*) released.*</title>
