# -*- 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
# $Id$

PortSystem          1.0
PortGroup           github 1.0

github.setup        github hub 2.2.9 v
categories          devel
platforms           darwin
license             MIT
maintainers         eitanadler.com:lists

description         git-wrapper for GitHub specific functionality
long_description    \
    hub is a command line utility which adds GitHub knowledge to git. \
    It can be used on its own or as a git wrapper.

homepage            https://hub.github.com/

checksums           rmd160  1afec3de053f124d22f9587ff889f2d212d6e909 \
                    sha256  9b94086ad52bf724c78b62568931027e01499f8c4e5b0aae476417c856bf7a98

build.cmd           ./script/build
build.target

depends_lib         port:go

use_configure       no

installs_libs       no

destroot {
    xinstall -W ${worksrcpath} bin/hub ${destroot}${prefix}/bin
    xinstall -W ${worksrcpath} man/hub.1 ${destroot}${prefix}/share/man/man1/hub.1
    set bash-completions ${destroot}${prefix}/share/bash-completion/completions
    xinstall -d ${bash-completions}
    xinstall -W ${worksrcpath} etc/hub.bash_completion.sh ${bash-completions}/hub
    set site-functions ${destroot}${prefix}/share/zsh/site-functions
    xinstall -d ${site-functions}
    xinstall -W ${worksrcpath} etc/hub.zsh_completion ${site-functions}/
}

notes "
To use 'hub' as a true git wrapper add the following line to your .zshrc or .bashrc

alias git=hub

or use 'hub' as standalone command
"

livecheck.regex     archive/[join ${github.tag_prefix} ""](\[^"-\]+)${extract.suffix}