# -*- 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
go.setup github.com/gohugoio/hugo 0.51 v
maintainers {isi.edu:calvin @cardi} openmaintainer
description A Fast and Flexible Static Site Generator built with love in GoLang
long_description ${description}
checksums rmd160 405266349fda5dfcba6c5852b5e8c2e9122c1fb6 \
sha256 061a4d4194c1f71331d86d38c42ebd787f6c9a138e7c4e694fa0d44801d80968 \
depends_build-append port:git
build.env-append GO111MODULE=on
xinstall -d ${destroot}${prefix}/bin
xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/${name}
# generate man pages then install them
system -W ${worksrcpath} "${worksrcpath}/${name} gen man"
xinstall -d -m 0755 ${destroot}${prefix}/share/man/man1
xinstall -m 0644 {*}[glob ${worksrcpath}/man/*.1] ${destroot}${prefix}/share/man/man1/
variant bash_completion {
depends_run-append path:etc/bash_completion:bash-completion
system -W ${worksrcpath} "${worksrcpath}/${name} gen autocomplete --completionfile=hugo.sh"
xinstall -d ${destroot}${prefix}/share/bash-completion/completions/
xinstall -m 644 ${worksrcpath}/hugo.sh ${destroot}${prefix}/share/bash-completion/completions/${name}