# $Id: Portfile 56342 2009-08-26 07:55:04Z vinc17@macports.org $

PortSystem          1.0

name                latexmk
version             4.10
categories          tex print
platforms           darwin
maintainers         vinc17

description         Automates the process of generating a LaTeX document
long_description \
    Latexmk completely automates the process of generating a LaTeX document. \
    Essentially, it is a highly specialized cousin of the general make       \
    utility.  Given the source files for a document, latexmk issues the      \
    appropriate sequence of commands to generate a .dvi, .ps, .pdf or        \
    hardcopy version of the document.  It can also be set to run             \
    continuously with a previewer\; the latex program, etc, are rerun        \
    whenever one of the source files is modified.

homepage            http://www.ctan.org/tex-archive/support/latexmk/
master_sites        http://www.ctan.org/get/support
distname            latexmk
dist_subdir         ${name}/${version}
use_zip             yes

checksums           md5     4d4c1edbccba1632479c34b8b10e1c4b \
                    sha1    f13740ddc2ba5162f48b503c407243dcbba5358b \
                    rmd160  a744df96f2d20abf32c43dd1e764d05f0d99e444

depends_lib         bin:latex:texlive

use_configure       no
build               {}

destroot {
    set bindir ${destroot}${prefix}/bin
    file mkdir ${bindir}
    xinstall -m 755 -v ${worksrcpath}/${name}.pl ${bindir}/${name}
    set mandir ${destroot}${prefix}/share/man/man1
    file mkdir ${mandir}
    xinstall -m 644 -v ${worksrcpath}/${name}.1 ${mandir}
    set docdir ${destroot}${prefix}/share/doc/${name}
    file mkdir ${docdir}
    xinstall -m 644 -v -W ${worksrcpath} \
        CHANGES COPYING README ${name}.pdf ${name}.txt ${docdir}
}

livecheck.check     regex
livecheck.regex     Version (\[0-9.\]+),
