aboutsummaryrefslogtreecommitdiffstats
path: root/community/hugo/APKBUILD
blob: 49e7fa19c3e2421a0cf2fc905de826c51455f866 (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
# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=hugo
pkgver=0.30.2
pkgrel=0
pkgdesc="A Fast and Flexible Static Site Generator built with love in GoLang"
url="http://gohugo.io/"
arch="all"
license="Apache 2.0"
depends=""
makedepends="go govendor"
install=""
source="${pkgname}-${pkgver}.tar.gz::https://github.com/gohugoio/hugo/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/gohugoio/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/ || return 1
	default_prepare
}

build() {
	cd "$builddir"
	export GOPATH="$srcdir"
	govendor sync -v || return 1
	go build -v -o bin/$pkgname || return 1
}

check() {
	rm -f $builddir/releaser/git_test.go
	cd "$builddir"
	export GOPATH="$srcdir"
	govendor test +local || return 1
}

package() {
	install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="368e8b3def91454dd1d3eabd061a71dfcf8d0545dddd7d875342a6ec6a8c01e4651a8d6a3d64efbccd13b2c009b695642da3e9edb07ed267bb9a5b7880b83dbc  hugo-0.30.2.tar.gz"