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

go.setup            github.com/twpayne/chezmoi 2.66.2 v
go.offline_build    no
revision            0

homepage            https://chezmoi.io

description         Manage your dotfiles across multiple machines, securely.

long_description    ${name} helps you manage your personal configuration \
                    files (dotfiles, like ~/.bashrc) across multiple machines.

categories          sysutils
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  3488bf9cea3abfeb07addb886bdff657ef151fd9 \
                    sha256  97e130cb32af75d1385e9200fe6443c83b0380868e1d1f2b48e4a12432a7acd1 \
                    size    2601314

build.cmd           make
build.pre_args-append \
                    BUILT_BY=macports \
                    VERSION="${github.tag_prefix}${version}"
build.args          build

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/

    # Install bash completion
    xinstall -d  ${destroot}${prefix}/share/bash-completion/completions
    xinstall -m 0644 ${worksrcpath}/completions/${name}-completion.bash \
        ${destroot}${prefix}/share/bash-completion/completions/${name}

    # Install zsh completion
    xinstall -d  ${destroot}${prefix}/share/zsh/site-functions
    xinstall -m 0644 ${worksrcpath}/completions/${name}.zsh \
        ${destroot}${prefix}/share/zsh/site-functions/_${name}

    # Install fish completion
    xinstall -d ${destroot}${prefix}/share/fish/vendor_completions.d
    xinstall -m 0644 ${worksrcpath}/completions/${name}.fish \
        ${destroot}${prefix}/share/fish/vendor_completions.d/${name}.fish
}