# -*- 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 115097 2013-12-24 22:55:14Z mojca@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        joeyh myrepos 1.20130826

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://myrepos.branchable.com/

checksums           rmd160  0d6d3d7a5e4ec0e3ca3dad8b86357c4372a9df5f \
                    sha256  ebfb45760de2e22fa2c6d5d5ad1f4583529c81793f5388667327acbffe39cf63

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/
}
