aboutsummaryrefslogtreecommitdiffstats
path: root/community/hugo/APKBUILD
blob: e10c1adbbcb157d173b378721132a40b47b92c80 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Contributor: Thomas Boerger <thomas@webhippie.de>
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=hugo
pkgver=0.111.3
pkgrel=6
pkgdesc="Fast and flexible static site generator written in Go"
url="https://gohugo.io/"
license="Apache-2.0"
arch="all !ppc64le" # fails tests
makedepends="go"
checkdepends="npm py3-docutils tzdata"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
"
source="https://github.com/gohugoio/hugo/archive/v$pkgver/hugo-$pkgver.tar.gz
	skip-git-tests.patch
	skip-para-test.patch
	skip-image-test.patch
	"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -o bin/$pkgname --tags extended
	./bin/hugo gen man
	./bin/hugo completion bash > hugo.bash
	./bin/hugo completion fish > hugo.fish
	./bin/hugo completion zsh > hugo.zsh
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm644 man/*.1 -t "$pkgdir"/usr/share/man/man1

	install -Dm644 hugo.bash \
		"$pkgdir"/usr/share/bash-completion/completions/hugo
	install -Dm644 hugo.fish \
		"$pkgdir"/usr/share/fish/completions/hugo.fish
	install -Dm644 hugo.zsh \
		"$pkgdir"/usr/share/zsh/site-functions/_hugo
}

sha512sums="
fd9fa9138cf714572d50328abc332edcdaaa3d45440914705d0d2119fd2a062c8df59732d9f5c23f540076e0c5a4104ac1d332f8633d93ab1479f82dd5ecce39  hugo-0.111.3.tar.gz
84b2cf8fee938a67aa78ba717879bb3718fb0f1816bcc0082d689f08cd80d8dbca1e81418d5bc5f2ebfcfa44bad08b1f8b379194e471a3d827d223984f94be54  skip-git-tests.patch
6ba192d8cb67f115f7ce596c297a55fc64713a4cdb0077cfbb7e45051c7560f5b668da88f513d4f34d8e0eeb4a9d991c5312d62e454c85e95960d8a33f0f8f69  skip-para-test.patch
0feb0495f03315c9224b301ea955061fcbbf9ae8f871640fbb4b5c0792785a714f3a030f702a1f1f6a8048d60f07a133df4ced2a989df0b9c851b8503b59d26d  skip-image-test.patch
"