aboutsummaryrefslogtreecommitdiff
path: root/community/hugo/APKBUILD
blob: 822cd677ed18e39932c759dcafa30ba788bd8a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=hugo
pkgver=0.76.3
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="48e9d1f54063e00e1e7282f3e812c512303a929c4dd75b63d39a668a867829c293dd26867c6012223eed9c6630b54494b23f15b0cd1f79c92a865bcaabd542de  hugo-0.76.3.tar.gz
57be9a6c8e49bd2a75921d51d8dc503439f68453a6c9803c9cecef8bb63541f10d8b652db151426949c1bcf134a96eec0253ee4a61c0987143d6159ea49e9588  0001-Remove-git-tests.patch
b1c2609a546869e5b1d9ada2eeb268c8f2d61f8838cd47ee80a24a6d9bb9d07e3652e3d8ef836a5e635ec295d27e2842c44ae2a0136560ba207f945e366162fc  0002-skip-tests-that-need-nodejs.patch"