# Contributor: Thomas Boerger # Maintainer: Thomas Boerger pkgname=hugo pkgver=0.71.1 pkgrel=0 pkgdesc="A Fast and Flexible Static Site Generator built with love in GoLang" url="https://gohugo.io/" arch="all !x86 !s390x !mips !mips64" # tests fail on x86, s390x and mips license="Apache-2.0" makedepends="go" subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch" source=" $pkgname-$pkgver.tar.gz::https://github.com/gohugoio/hugo/archive/v$pkgver.tar.gz 0001-Remove-git-tests.patch 0002-skip-tests-that-need-nodejs.patch " build() { go build -v -o bin/$pkgname --tags extended ./bin/hugo gen man ./bin/hugo gen autocomplete --completionfile="$builddir"/hugo.bash } check() { # image_test.so:548 fails case "$CARCH" in aarch64|ppc64le) return 0 ;; esac go test ./... } package() { install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname install -Dm644 "$builddir"/man/*.1 -t "$pkgdir"/usr/share/man/man1 } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" install -Dm644 "$builddir"/hugo.bash \ "$subpkgdir"/usr/share/bash-completion/completions/hugo } sha512sums="2fa3f63cebdf5a9f625efc5d6164c27abd45543f627cf2f35e9c78edfac8eec479fd2c22ebf970eef5fd6c8781cbc4eb4c77063d0f4bc005cb22f309d3ce4c6c hugo-0.71.1.tar.gz 54dc7012d67b7970bceb9d4423d9c5971fd9875b5e566f1ab8ae07a11fdb009c379b55ebbbb3a0f74d530de9075ed1794acc42274ef6460381db98116acfe0a7 0001-Remove-git-tests.patch ddb43dddbef7a5a229be9408f3a87cedef09d7fdad347fd797a4ccb2e98c4baab95846565111d063ea88f0ac524cffd630eb39dd862e973cfe87b5dcdd4c8ef4 0002-skip-tests-that-need-nodejs.patch"