mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
68 lines
2.8 KiB
Tcl
68 lines
2.8 KiB
Tcl
# -*- 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/mikefarah/yq 4.53.3 v
|
|
go.package github.com/mikefarah/yq/v4
|
|
go.offline_build no
|
|
revision 0
|
|
dist_subdir ${name}/${version}_${revision}
|
|
|
|
homepage https://mikefarah.gitbook.io/yq
|
|
|
|
description \
|
|
yq is a portable command-line YAML processor
|
|
|
|
long_description \
|
|
{*}${description}. The aim of the project is to be the jq or sed of yaml \
|
|
files.
|
|
|
|
categories textproc sysutils
|
|
installs_libs no
|
|
license MIT
|
|
maintainers {gmail.com:herby.gillot @herbygillot} \
|
|
openmaintainer
|
|
|
|
checksums ${distname}${extract.suffix} \
|
|
rmd160 d5472165163ba6849cbf3ff74d9c34777eb68546 \
|
|
sha256 fadf86d0ae3988bb40fa8aad424d0c71658493f6377285e711c7e7e313b3b238 \
|
|
size 369698 \
|
|
${name}_man_page_only${extract.suffix} \
|
|
rmd160 dd8ed0b6d75f67956a4005bee59e24489b0881c5 \
|
|
sha256 0cffbc48060c085a554966f8b098e3ff6664a2ac289dd92bc8e66f2f77be49d6 \
|
|
size 48684
|
|
|
|
# use generated man page to avoid build depedency on pandoc
|
|
master_sites-append https://github.com/mikefarah/yq/releases/download/v${version}/yq_man_page_only${extract.suffix}?dummy=:yqman
|
|
distfiles-append yq_man_page_only${extract.suffix}:yqman
|
|
|
|
build.pre_args-append \
|
|
-ldflags \"-X ${go.package}/cmd.Version=${version}\"
|
|
build.args-append -o ${name}
|
|
|
|
destroot {
|
|
xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
|
|
xinstall -d ${destroot}${prefix}/share/man/man1
|
|
xinstall -m 0644 ${workpath}/${name}.1 ${destroot}${prefix}/share/man/man1/
|
|
|
|
xinstall -d ${destroot}${prefix}/share/${name}
|
|
xinstall -m 0644 ${worksrcpath}/LICENSE ${destroot}${prefix}/share/${name}
|
|
file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/
|
|
|
|
set bash_completion ${prefix}/share/bash-completion/completions
|
|
xinstall -d ${destroot}${bash_completion}
|
|
exec ${destroot}${prefix}/bin/${name} shell-completion bash > \
|
|
${destroot}${bash_completion}/${name}
|
|
|
|
set zsh_completion ${prefix}/share/zsh/site-functions
|
|
xinstall -d ${destroot}${zsh_completion}
|
|
exec ${destroot}${prefix}/bin/${name} shell-completion zsh > \
|
|
${destroot}${zsh_completion}/_${name}
|
|
|
|
set fish_completion ${prefix}/share/fish/vendor_completions.d
|
|
xinstall -d ${destroot}${fish_completion}
|
|
exec ${destroot}${prefix}/bin/${name} shell-completion fish > \
|
|
${destroot}${fish_completion}/${name}.fish
|
|
}
|