# -*- 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        rbenv rbenv 1.2.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
license             MIT
categories          ruby
platforms           any
supported_archs     noarch

maintainers         nomaintainer

description         Simple Ruby Version Management
long_description    {*}${description}

checksums           rmd160  84cfcec8002c4b8d2383d0336ce1b4b44f53eaee \
                    sha256  4b3e8f6a9c3e89dfc2930d2bb6c6ac025f883b62dcfd7518ea4babb4e2a2e205 \
                    size    33015

use_configure       no
build {}
destroot {
    copy ${worksrcpath}/libexec ${destroot}${prefix}/libexec/rbenv
    ln -s ../libexec/rbenv/rbenv ${destroot}${prefix}/bin/rbenv
    xinstall -d ${destroot}${prefix}/etc/bash_completion.d
    xinstall ${worksrcpath}/completions/rbenv.bash \
        ${destroot}${prefix}/etc/bash_completion.d/rbenv
    xinstall -d ${destroot}${prefix}/share/zsh/site-functions
    xinstall ${worksrcpath}/completions/rbenv.zsh \
        ${destroot}${prefix}/share/zsh/site-functions/rbenv.zsh_completion
}

notes {
    To enable the rbenv subcommand 'install', install port ruby-build.
}
