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

PortSystem          1.0
PortGroup           github 1.0

github.setup        StreakyCobra gws 0.2.0
github.tarball_from archive
categories          devel sysutils
platforms           any
supported_archs     noarch
maintainers         nomaintainer
license             MIT

description         helper for git workspaces
long_description \
    gws is a KISS, bash, colorful helper to manage workspaces \
    composed of git repositories.

checksums           rmd160  0c2afe062d2f203ec7551ba16542b650ad5e4f32 \
                    sha256  f92b7693179c2522c57edd578abdb90b08f6e2075ed27abd4af56c1283deab1a \
                    size    19562

patchfiles          patch-interpreter.diff

post-patch {
    reinplace "s:@@PREFIX@@:${prefix}:g" ${worksrcpath}/src/gws
}

depends_run         port:bash \
                    port:git


use_configure no
build {}

destroot {
    xinstall -m 0755 ${worksrcpath}/src/gws ${destroot}${prefix}/bin/gws
    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/gws
    xinstall -m 0644 -W ${worksrcpath} README.md LICENSE CHANGELOG ${destroot}${prefix}/share/doc/gws/
    xinstall -d -m 0755 ${destroot}${prefix}/share/zsh/site-functions/
    xinstall -m 0644 ${worksrcpath}/completions/zsh ${destroot}${prefix}/share/zsh/site-functions/_gws
    xinstall -d -m 0755 ${destroot}${prefix}/share/bash-completion/completions/
    xinstall -m 0644 ${worksrcpath}/completions/bash ${destroot}${prefix}/share/bash-completion/completions/gws
}
