diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2017-10-20 10:29:32 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2017-10-20 10:30:45 +0200 |
commit | e89155c9978ef49a82728e701b6567d750715bab (patch) | |
tree | 457dc413d759f14ddacf14781634f5eafeac3148 /testing/gb | |
parent | b8f3db09f536f880f25a5242e99942c488f0a376 (diff) | |
download | aports-e89155c9978ef49a82728e701b6567d750715bab.tar.bz2 aports-e89155c9978ef49a82728e701b6567d750715bab.tar.xz |
testing/gb: new aport: new aport
Diffstat (limited to 'testing/gb')
-rw-r--r-- | testing/gb/APKBUILD | 55 | ||||
-rw-r--r-- | testing/gb/buildmode-pie.patch | 11 |
2 files changed, 66 insertions, 0 deletions
diff --git a/testing/gb/APKBUILD b/testing/gb/APKBUILD new file mode 100644 index 0000000000..1109e53bec --- /dev/null +++ b/testing/gb/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=gb +pkgver=0.4.4 +_errors_ver=0.8.0 +pkgrel=0 +pkgdesc="Project based build tool for Go" +url="https://getgb.io/" +arch="all" +license="MIT" +depends="" +makedepends="go" +install="" +subpackages="" +source="gb-$pkgver.tar.gz::https://github.com/constabulary/gb/archive/v$pkgver.tar.gz + go-errors-$_errors_ver.tar.gz::https://github.com/pkg/errors/archive/v$_errors_ver.tar.gz + buildmode-pie.patch + " +builddir="$srcdir/src/github.com/constabulary/$pkgname" + +prepare() { + mkdir -p ${builddir%/*} + mv "$srcdir"/$pkgname-$pkgver "$builddir"/ + mkdir -p "$srcdir"/src/github.com/pkg + mv "$srcdir"/errors-$_errors_ver "$srcdir"/src/github.com/pkg/errors + cd "$builddir" + default_prepare +} + +build() { + cd "$builddir" + export GOPATH="$srcdir" + for bin in gb gb-vendor; do + cd "$builddir"/cmd/$bin && go build -v + done +} + +check() { + msg "Running tests..." + for bin in gb gb-vendor; do + "$builddir"/cmd/$bin/$bin help > /dev/null + done +} + +package() { + cd "$builddir" + for bin in gb gb-vendor; do + install -Dm755 "$builddir"/cmd/$bin/$bin \ + "$pkgdir"/usr/bin/$bin + done +} + +sha512sums="d83dd4d80a1126708b0eaa4492eeac9ba772926fdb25a51d80c881db6c0bc6e5edae82f946fd61ae905f689290b4b031698d795006a62a2bcfada8beb535eac4 gb-0.4.4.tar.gz +82055b10c02f13a8ce497388729568ddde7ae61e9fb2592b9acb11c61dfe94d5554432aee168e7c7adbd8345511c3e4ce0ba4c1b23cf253480e199a95316c443 go-errors-0.8.0.tar.gz +38f753d328258d0e1c608aa99c31c080f2fe6a72a1710e78df15e8e47caa54f985b4d13af698c08eb10e0e7615d7848a709dcb7f5c9800ab80ccb34ce1b59a0b buildmode-pie.patch" diff --git a/testing/gb/buildmode-pie.patch b/testing/gb/buildmode-pie.patch new file mode 100644 index 0000000000..37db8e4c55 --- /dev/null +++ b/testing/gb/buildmode-pie.patch @@ -0,0 +1,11 @@ +--- ./context.go.orig ++++ ./context.go +@@ -146,7 +146,7 @@ + ctx := Context{ + Project: p, + workdir: workdir, +- buildmode: "exe", ++ buildmode: "pie", + pkgs: make(map[string]*Package), + } + |