aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2018-03-20 21:39:43 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2018-09-04 12:04:20 +0000
commit09abdcd67a28428318626eae1eabc5b6448a1e05 (patch)
treed43d6a095b102493de408197f1dd63615294809e
parenteaabed32cd44d1a67cf8fb4cd6f6de72535b9630 (diff)
downloadaports-09abdcd67a28428318626eae1eabc5b6448a1e05.tar.bz2
aports-09abdcd67a28428318626eae1eabc5b6448a1e05.tar.xz
community/go-bootstrap: modernize APKBUILD
-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 f244a5be09..9b46f0783c 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