# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 99232 2012-10-30 00:10:29Z ryandesign@macports.org $

PortSystem          1.0

name                mr
version             1.13
categories          devel
platforms           darwin
maintainers         googlemail.com:gjasny openmaintainer
license             GPL-2+

description         Multiple repository management tool

long_description    The mr(1) command can checkout, update, or perform other actions on a set of \
                    repositories as if they were one combined respository. It supports any combination \
                    of git, svn, mercurial, bzr, darcs, cvs, vcsh, fossil, and veracity repositories, \
                    and support for other version control systems can easily be added. \
                    (There are extensions adding support for unison and git-svn, among others.)

homepage            http://joeyh.name/code/mr/

master_sites        debian:m/${name}
distname            ${name}_${version}
worksrcdir          ${name}

checksums           rmd160 3d64e271ea0a0ac6dee07c5fb32cc5a8a6e64aa3 \
                    sha256 9f7e93568113497c59f4fdb132f77cba06ca2d1705c1dec506632fded0ec78e0

supported_archs     noarch
use_configure       no
build.target        build

depends_lib         port:perl5.12

depends_run         port:p5.12-html-parser \
                    port:p5.12-libwww-perl \
                    port:p5.12-getopt-long

post-patch {
    reinplace -locale C "s|^#!.*perl|#!${prefix}/bin/perl5.12|" ${worksrcpath}/mr ${worksrcpath}/webcheckout
}

destroot {
    xinstall -W ${worksrcpath} -m 755 mr webcheckout ${destroot}${prefix}/bin
    xinstall -d -m 755 ${destroot}${prefix}/share/${name}
    eval xinstall -W ${worksrcpath} -m 644 [glob lib/*] ${destroot}${prefix}/share/${name}
    xinstall -W ${worksrcpath} -m 644 mr.1 webcheckout.1 ${destroot}${prefix}/share/man/man1/
}

livecheck.type      regex
livecheck.regex     {>version ([0-9.]+)<}
