aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gx/APKBUILD
blob: 6cbc4b7c5182b7e2b5053cddf882c55b032bacd3 (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
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=gx
pkgver=0.14.1
pkgrel=0
pkgdesc="Packaging tool build around the distributed, content addressed filesystem IPFS"
url="https://github.com/whyrusleeping/gx"
arch="all"
license="MIT"
options="!check" # Test suite issues
makedepends="git glide go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/whyrusleeping/$pkgname/archive/v$pkgver.tar.gz
	glide.yaml
	glide.lock"
builddir="$srcdir/src/github.com/whyrusleeping/$pkgname"

prepare() {
	export GOPATH="$srcdir"

	mkdir -p $(dirname $builddir)
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/

	cd "$builddir"
	cp "$srcdir"/glide.yaml "$srcdir"/glide.lock .
	glide install --skip-test

	default_prepare
}

build() {
	GOPATH="$srcdir" GOBIN="$GOPATH/bin" make
}

package() {
	cd "$builddir"

	install -Dm 755 gx "${pkgdir}/usr/bin/gx"
	install -Dm 644 -t "${pkgdir}/usr/share/licenses/gx" LICENSE
}

glide_init() {
	abuild clean deps unpack prepare
	cd "$builddir"
	export GOPATH="$startdir"
	rm -f glide.yaml glide.lock
	glide init --non-interactive
	glide update
	cp glide.yaml glide.lock "$startdir"
	cd "$startdir" && abuild checksum clean
}

sha512sums="cb61f669e9945604cb68225ce4cee3ff26d944b54078909aa573b781bd72b928a603e94a21eb95644a23ec2e09b0bf4deef84457f588d9be16a0b4dbf8d7f194  gx-0.14.1.tar.gz
b1ac1cdd2ed760072cab4d63876ad711407bc467bee37ee3740b477f1071a13e0086afef99d15cb9267634ca8496aa92d1a1b399fc99f0479336433c9212810d  glide.yaml
714485ca86fbb98af8bb17493a8e57f4e5e850bfffd6b3bbf2549dfa8c3cdd48b127104d1ad2c4983fe4377850d8d5953adcd90d6cfdae6d7de876be4a59e58e  glide.lock"