community/go: fix subpkgdir vs. pkgdir

This commit is contained in:
Timo Teräs 2017-06-19 15:25:37 +03:00
parent bbff2dbbfb
commit 57f6e7c808

View File

@ -120,16 +120,16 @@ package() {
# bug (https://github.com/golang/go/issues/2775).
# When this is resolved we can split out the source to a
# go-src sub package.
mkdir -p "$subpkgdir"/usr/lib/go/
cp -a "$builddir"/src "$subpkgdir"/usr/lib/go
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).
find "$subpkgdir"/usr/lib/go/src \( -type f -a -name "*_test.go" \) \
find "$pkgdir"/usr/lib/go/src \( -type f -a -name "*_test.go" \) \
-exec rm -rf \{\} \+
find "$subpkgdir"/usr/lib/go/src \( -type d -a -name "testdata" \) \
find "$pkgdir"/usr/lib/go/src \( -type d -a -name "testdata" \) \
-exec rm -rf \{\} \+
find "$subpkgdir"/usr/lib/go/src -type f -a \( -name "*.bash" -o -name "*.rc" -o -name "*.bat" \) \
find "$pkgdir"/usr/lib/go/src -type f -a \( -name "*.bash" -o -name "*.rc" -o -name "*.bat" \) \
-exec rm -rf \{\} \+
}