aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gx/APKBUILD
blob: 4dd474bc93eaf21bd4dea6e5ee9e1fcef0a221f6 (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
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=gx
pkgver=0.14.2
pkgrel=1
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() {
	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="60d0dfd330181f82d69a6018c5ac7a3d1cd5a3dd137dd93dba01b6ab1374a961eceb377d4ff7c69753e6fc80fcbcc3f780bbb57cc19ec0cee961cdba787ef87d  gx-0.14.2.tar.gz
b1ac1cdd2ed760072cab4d63876ad711407bc467bee37ee3740b477f1071a13e0086afef99d15cb9267634ca8496aa92d1a1b399fc99f0479336433c9212810d  glide.yaml
6ddf9614c4244258191f0ba7fe1e41d5f84981795a71edc1f3d117f7ec72f1928d887a2dd9aecdb78c7cdac6c04eedf09e2e0af79f6049c337e122b5c7ac5ee7  glide.lock"