# -*- 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 name carapace version 1.4.1 revision 0 go.setup github.com/carapace-sh/carapace-bin ${version} v categories sysutils maintainers {gmail.com:esafak @esafak} openmaintainer license MIT description Command-line interface completion framework long_description Carapace provides multi-shell (bash, zsh, fish, powershell) \ completions for CLI programs. homepage https://carapace.sh/ # Update with `port checksum carapace` checksums rmd160 59701f436ebbf0bf2b0ffa1a9369d969a009a86b \ sha256 7460eef0ea7d19e5d0082e425fbef08f506d926d995701c7a8c3c6e90c9e61c5 \ size 18185679 build { system -W ${worksrcpath} "${go.bin} generate ./..." system -W ${worksrcpath} "${go.bin} build -v -o ${worksrcpath}/carapace -ldflags '-s -w -X main.version=${version}' -tags release ./cmd/carapace" } destroot { xinstall -m 755 ${worksrcpath}/carapace ${destroot}${prefix}/bin/carapace # Create directories for completions xinstall -d ${destroot}${prefix}/share/bash-completion/completions xinstall -d ${destroot}${prefix}/share/fish/vendor_completions.d xinstall -d ${destroot}${prefix}/share/zsh/site-functions xinstall -d ${destroot}${prefix}/share/nushell/completions # Generate and install shell completion scripts system "${destroot}${prefix}/bin/carapace completion bash > ${destroot}${prefix}/share/bash-completion/completions/carapace" system "${destroot}${prefix}/bin/carapace completion fish > ${destroot}${prefix}/share/fish/vendor_completions.d/carapace.fish" system "${destroot}${prefix}/bin/carapace completion zsh > ${destroot}${prefix}/share/zsh/site-functions/_carapace" system "${destroot}${prefix}/bin/carapace completion nushell > ${destroot}${prefix}/share/nushell/completions/carapace.nu" } livecheck.type github