Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit fe2390f

Browse files
Foxboronsvntogit
authored and
svntogit
committed
upgpkg: go 2:1.17-1 - Gopher have been sent to fat trimming
git-svn-id: file:///srv/repos/svn-community/svn@1001085 9fca08f4-af9d-4005-b8df-a31f2cc04f65
1 parent bc30c28 commit fe2390f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

trunk/PKGBUILD

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
pkgname=go
1515
epoch=2
16-
pkgver=1.16.7
16+
pkgver=1.17
1717
pkgrel=1
1818
pkgdesc='Core compiler tools for the Go programming language'
1919
arch=(x86_64)
@@ -25,7 +25,7 @@ provides=(go-pie)
2525
options=(!strip staticlibs)
2626
source=(https://storage.googleapis.com/golang/go$pkgver.src.tar.gz{,.asc})
2727
validpgpkeys=('EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796')
28-
sha256sums=('1a9f2894d3d878729f7045072f30becebe243524cf2fce4e0a7b248b1e0654ac'
28+
sha256sums=('3a70e5055509f347c0fb831ca07a2bf3b531068f349b14a3c652e9b5b67beb5d'
2929
'SKIP')
3030

3131
build() {
@@ -39,8 +39,7 @@ build() {
3939
cd "$pkgname/src"
4040
./make.bash --no-clean -v
4141

42-
PATH="$GOBIN:$PATH" go install -v -race std
43-
PATH="$GOBIN:$PATH" go install -v -buildmode=shared std
42+
PATH="$GOBIN:$PATH" go install -v std
4443
}
4544

4645
check() {
@@ -50,20 +49,23 @@ check() {
5049
export GOROOT="$srcdir/$pkgname"
5150
export GOBIN="$GOROOT/bin"
5251
export PATH="$srcdir/$pkgname/bin:$PATH"
53-
export GO_TEST_TIMEOUT_SCALE=2
52+
export GO_TEST_TIMEOUT_SCALE=3
5453

5554
cd $pkgname/src
56-
# rm os/signal/signal_cgo_test.go # TODO: There is a bug somewhere.
57-
# # Should only affect containers
58-
# # so lets just say No.
5955
./run.bash --no-rebuild -v -v -v -k
6056
}
6157

6258
package() {
6359
cd "$pkgname"
6460

65-
install -d "$pkgdir/usr/bin" "$pkgdir/usr/lib/go" "$pkgdir/usr/share/doc/go"
66-
cp -a bin pkg src lib misc api test "$pkgdir/usr/lib/go"
61+
install -d "$pkgdir/usr/bin" "$pkgdir/usr/lib/go" "$pkgdir/usr/share/doc/go" \
62+
"$pkgdir/usr/lib/go/pkg/linux_amd64_"{dynlink,race}
63+
64+
# TODO: Make split package for source files?
65+
# This saves around 100 MB.
66+
# Rest of the size is from the duplicate _race and _dynlib .a files
67+
# cp -a bin pkg src lib misc api test "$pkgdir/usr/lib/go"
68+
cp -a bin pkg src lib "$pkgdir/usr/lib/go"
6769
cp -r doc/* "$pkgdir/usr/share/doc/go"
6870

6971
ln -sf /usr/lib/go/bin/go "$pkgdir/usr/bin/go"
@@ -76,6 +78,8 @@ package() {
7678

7779
# TODO: Figure out if really needed
7880
rm -rf "$pkgdir"/usr/lib/go/pkg/obj/go-build/*
81+
find "$pkgdir/usr/lib/go" -name "testdata" -type d -prune -exec rm -rf "{}" \;
82+
find "$pkgdir/usr/lib/go" -name "*_test.go" -exec rm -rf "{}" \;
7983

8084
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
8185
}

0 commit comments

Comments
 (0)