# Contributor: Thomas Boerger # Maintainer: Thomas Boerger pkgname=hugo pkgver=0.79.1 pkgrel=0 pkgdesc="Fast and flexible static site generator written in Go" url="https://gohugo.io/" arch="all !x86 !s390x !mips !mips64" # tests fail on x86 and s390x; limited by go on mips license="Apache-2.0" makedepends="go" subpackages="$pkgname-doc $pkgname-bash-completion" 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 install -Dm644 "$builddir"/hugo.bash \ "$pkgdir"/usr/share/bash-completion/completions/hugo } sha512sums="61db9bef0a99d2885c41583aa785da90870583e2c5994b7f5857fc7a8a574d16f3e112aa4f6739186c4e11a48a779f1175f8cdccba8035cc352617ec6db326f9 hugo-0.79.1.tar.gz 57be9a6c8e49bd2a75921d51d8dc503439f68453a6c9803c9cecef8bb63541f10d8b652db151426949c1bcf134a96eec0253ee4a61c0987143d6159ea49e9588 0001-Remove-git-tests.patch b4656113d6918912d85434bb72e0183b25ffab9e298b63c35b10b6cbcaa89d9ab4a878c4c28bc3feb7bc9b6c7706333e460b6470c92a07e90a91975e1326fd58 0002-skip-tests-that-need-nodejs.patch"