aboutsummaryrefslogtreecommitdiffstats
path: root/community/go
diff options
context:
space:
mode:
Diffstat (limited to 'community/go')
-rw-r--r--community/go/APKBUILD13
1 files changed, 9 insertions, 4 deletions
diff --git a/community/go/APKBUILD b/community/go/APKBUILD
index 7424eecb34f..33db17bbef2 100644
--- a/community/go/APKBUILD
+++ b/community/go/APKBUILD
@@ -4,7 +4,7 @@
pkgname=go
# go binaries are statically linked, security updates require rebuilds
pkgver=1.13.4
-pkgrel=1
+pkgrel=2
pkgdesc="Go programming language compiler"
url="https://golang.org/"
arch="all"
@@ -127,13 +127,18 @@ package() {
mkdir -p "$pkgdir"/usr/lib/go/
cp -a "$builddir"/src "$pkgdir"/usr/lib/go
- # Remove tests from /usr/lib/go/src.
- # Those shouldn't be affacted by the upstream bug (see above).
+ # Remove tests from /usr/lib/go/src to reduce package size,
+ # these should not be needed at run-time by any program.
find "$pkgdir"/usr/lib/go/src \( -type f -a -name "*_test.go" \) \
-exec rm -rf \{\} \+
find "$pkgdir"/usr/lib/go/src \( -type d -a -name "testdata" \) \
-exec rm -rf \{\} \+
- find "$pkgdir"/usr/lib/go/src -type f -a \( -name "*.bash" -o -name "*.rc" -o -name "*.bat" \) \
+
+ # Remove rc (plan 9) and bat scripts (windows) to reduce package
+ # size further. The bash scripts are actually needed at run-time.
+ #
+ # See: https://gitlab.alpinelinux.org/alpine/aports/issues/11091
+ find "$pkgdir"/usr/lib/go/src -type f -a \( -name "*.rc" -o -name "*.bat" \) \
-exec rm -rf \{\} \+
}