# -*- 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           python 1.0
PortGroup           github 1.0

github.setup        bbugyi200 funky 3.5.5 v
revision            0

description         Funky takes shell functions to the next level by making \
                    them easier to define, more flexible, and more interactive.

long_description    {*}${description}

platforms           {darwin any} linux freebsd
supported_archs     noarch
license             MIT
categories          sysutils python
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
installs_libs       no

checksums           rmd160  cc4005155313cec3601ab712c26e802d10cf9376 \
                    sha256  c86ce3adf46bd2389fcb77e0109bd90e9099c427b3d4c65e716ff118d5bfc8af \
                    size    407701

set fky_script_dir  ${prefix}/share
set fky_script      ${fky_script_dir}/${name}/${name}.sh

github.tarball_from archive

python.default_version \
                    313

depends_build-append \
                    port:py${python.version}-setuptools

depends_lib-append  port:py${python.version}-future     \
                    port:py${python.version}-pygments   \
                    port:py${python.version}-six

destroot.env-append XDG_DATA_HOME=${fky_script_dir}

pre-destroot {
    xinstall -d ${destroot}${fky_script_dir}/${name}
    xinstall -m 0755 ${worksrcpath}/scripts/shell/funky.sh ${destroot}${fky_script}
}

notes "
    The ${name} shell script has been installed to:

        ${fky_script}

    To use ${name}, please source this script in your shell by adding the\
    following to your ~/.bashrc or ~/.zshrc:

    \[ -f ${fky_script} \] && source ${fky_script}
"

github.livecheck.regex \
                    {([0-9.]+)}

