# -*- 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        jghub sd-switchdir 3.2.0 v
revision            0
checksums           rmd160  8c6fc06c3a2669af9a493053bdb92d256539a8f6 \
                    sha256  87bcd6442acfeed9e3bf33c2fa03d3426e800ffd3e71f2b967afd3de1c66f1be \
                    size    23178

description         a directory navigation utility for ksh93u+, bash, and zsh

long_description    SD is a directory navigation utility for ksh93u+, bash >= \
                    4.2, and zsh >= 4.3, using frequency–recency tracking over \
                    an explicit visit history. Ksh-compatibility options are \
                    enabled: extglob in bash\; KSH_ARRAYS, KSH_GLOB, \
                    POSIX_BUILTINS, and SH_WORD_SPLIT in zsh.

categories          sysutils
license             MIT
maintainers         nomaintainer
platforms           any
supported_archs     noarch
installs_libs       no

github.tarball_from archive

use_configure       no

build {}

set docdir ${prefix}/share/doc/${subport}
set scriptdir ${prefix}/etc/profile.d

destroot {
    xinstall -d ${destroot}${docdir} ${destroot}${scriptdir}
    xinstall -m 0644 -W ${worksrcpath} \
        CHANGELOG.md \
        LICENSE \
        README.md \
        ${destroot}${docdir}
    xinstall ${worksrcpath}/sd.ksh ${destroot}${scriptdir}
}

notes "
To use SD, add the following line to your shell rc file:

. ${scriptdir}/sd.ksh

To customize, see the Configuration section in ${docdir}/README.md.
"
