aboutsummaryrefslogtreecommitdiffstats
path: root/community/go-bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'community/go-bootstrap')
-rw-r--r--community/go-bootstrap/APKBUILD34
1 files changed, 11 insertions, 23 deletions
diff --git a/community/go-bootstrap/APKBUILD b/community/go-bootstrap/APKBUILD
index f244a5be090..9b46f0783ca 100644
--- a/community/go-bootstrap/APKBUILD
+++ b/community/go-bootstrap/APKBUILD
@@ -23,49 +23,37 @@ source="
default-sc-getpw-r-size-max.patch
new-binutils.patch
"
+builddir="$srcdir"/$_realname
# NOTE: building go-bootstrap for x86 with grsec kernel requires:
# sysctl -w kernel.modify_ldt=1
-_builddir="$srcdir"/$_realname
-prepare() {
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) patch -p1 -i "$srcdir"/$i || return 1 ;;
- esac
- done
-}
-
build() {
- cd "$_builddir/src"
+ cd "$builddir/src"
export GOPATH="$srcdir"
- export GOROOT="$_builddir"
+ export GOROOT="$builddir"
export GOBIN="$GOROOT"/bin
export GOROOT_FINAL=/usr/lib/$pkgname
export CGO_ENABLED=0
case "$CARCH" in
- x86) export GOARCH="386" ;;
- x86_64) export GOARCH="amd64" ;;
- arm*) export GOARCH="arm" ;;
- mips) export GOARCH="mips" ;;
- mips64) export GOARCH="mips64" ;;
+ x86) export GOARCH="386" ;;
+ x86_64) export GOARCH="amd64" ;;
+ arm*) export GOARCH="arm" ;;
+ mips) export GOARCH="mips" ;;
+ mips64) export GOARCH="mips64" ;;
mips64el) export GOARCH="mips64le" ;;
- mipsel) export GOARCH="mipsle" ;;
- *) return 1 ;;
+ mipsel) export GOARCH="mipsle" ;;
+ *) return 1 ;;
esac
./make.bash --no-clean || return 1
-
- # FIXME: race and bench tests fail:
- #PATH="$GOROOT/bin:$PATH" ./run.bash --no-rebuild --banner || return 1
}
package() {
- cd "$_builddir"
+ cd "$builddir"
mkdir -p "$pkgdir"/usr/lib/$pkgname "$pkgdir"/usr/lib/$pkgname
# The source needs to be installed due to an upstream