# -*- 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: Portfile 91350 2012-03-30 16:03:18Z singingwolfboy@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        defunkt hub 1.8.4 v
revision            1
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.
maintainers         phw openmaintainer
categories          devel
license             MIT
platforms           darwin
supported_archs     noarch

homepage            http://defunkt.io/hub/

checksums           rmd160  d2146a1bfd0fc8b6e2f3ca79b5addc6492f88d34 \
                    sha256  8657f3d8039f416f91619b682aabfbeca615c6eb02a76d1de0a8cbece30a3e12

depends_build       bin:rake:rb-rake

depends_lib         port:git-core

use_configure       no

build {}

destroot.cmd        rake
destroot.args       prefix=${destroot}${prefix}
post-destroot {
    set bash-completions ${destroot}${prefix}/etc/bash_completion.d
    xinstall -d ${bash-completions}
    xinstall ${worksrcpath}/etc/hub.bash_completion.sh ${destroot}${prefix}/etc/bash_completion.d/hub
    set site-functions ${destroot}${prefix}/share/zsh/site-functions
    xinstall -d ${site-functions}
    xinstall ${worksrcpath}/etc/hub.zsh_completion ${site-functions}/
}

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

alias git=hub

or use 'hub' as standalone command
"
