aboutsummaryrefslogtreecommitdiffstats
path: root/testing/go-conf/APKBUILD
blob: aa387c518dcfae275ce5eeb07854692988dfce26 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-conf
_pkgname=goconf
_vendor=dlintw
pkgver=0_git20170102
pkgrel=2
pkgdesc="goconf package - fork from https://code.google.com/p/goconf/"
url="https://github.com/$_vendor/$_pkgname"
arch="noarch"
license="BSD-3-Clause"
depends="go"
subpackages="$pkgname-doc"
source="https://dev.alpinelinux.org/archive/$_pkgname/$_pkgname-$pkgver.tar.gz"
giturl="https://github.com/dlintw/$_pkgname.git"
disturl="larena@dev.alpinelinux.org:/archive/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	cd "$builddir"
	export GOPATH="$srcdir" make all
}

check() {
	cd "$builddir"
	export GOPATH="$srcdir" make test
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/doc/$_vendor/$pkgname \
		"$pkgdir"/usr/lib/go/src/vendor/github.com/$_vendor/$_pkgname
	for file in \
		LICENSE \
		README.* \
		COPYRIGHT \
		AUTHORS \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$pkgname
	done
	mv *.go "$pkgdir"/usr/lib/go/src/vendor/github.com/$_vendor/$_pkgname
}

sha512sums="b497d81356b8dc93b6421cadfd4e396399ff7eea183fec1509f925d46b3d19367294c2515589d3f1ee3dd20169980615a8bec030a9a7479274b9add2446c0e59  goconf-0_git20170102.tar.gz"