Browse Source

d/golang: Upgraded to golang-1.12.4.

slackware-14.2
Damien Goutte-Gattat 3 years ago
parent
commit
28eb7a92ab
  1. 1
      d/golang/go-1.12.4.tar.gz.sha256
  2. 1
      d/golang/go-1.8.tar.gz.sha1
  3. 1
      d/golang/go1.4-bootstrap-20161024.tar.gz.sha1
  4. 28
      d/golang/golang.SlackBuild

1
d/golang/go-1.12.4.tar.gz.sha256

@ -0,0 +1 @@
84ab28c1e148f0e43cb377a50117a4c162d4394ecd43c08589b2d62f963d590a go-1.12.4.tar.gz

1
d/golang/go-1.8.tar.gz.sha1

@ -1 +0,0 @@
cdb8b91840293afe0957e927fa323d163a64b1ab go-1.8.tar.gz

1
d/golang/go1.4-bootstrap-20161024.tar.gz.sha1

@ -1 +0,0 @@
47e02e41aa99dea899b65ebf7b50ec706141be8c go1.4-bootstrap-20161024.tar.gz

28
d/golang/golang.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2017 Damien Goutte-Gattat
# Copyright (C) 2017,2019 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -26,11 +26,9 @@
# Source package infos
NAMESRC=${NAMESRC:-go}
VERSION=${VERSION:-1.8}
VERSION=${VERSION:-1.12.4}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
GITREPO=${GITREPO:-https://go.googlesource.com/go}
BOOTSTRAP_ARCHIVE=${BOOTSTRAP_ARCHIVE:-go1.4-bootstrap-20161024.tar.gz}
BOOTSTRAP_WGET=${BOOTSTRAP_WGET:-https://storage.googleapis.com/golang/$BOOTSTRAP_ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-golang}
@ -60,19 +58,8 @@ fi
if [ -f /opt/go/bin/go ]; then
GOROOT_BOOTSTRAP=/opt/go
else
if [ ! -r $BOOTSTRAP_ARCHIVE ]; then
wget -c -O $BOOTSTRAP_ARCHIVE.part "$BOOTSTRAP_WGET"
mv $BOOTSTRAP_ARCHIVE.part $BOOTSTRAP_ARCHIVE
fi
sha1sum -c $BOOTSTRAP_ARCHIVE.sha1
cd $TMP
echo "Building $BOOTSTRAP_ARCHIVE..."
tar xf $CWD/$BOOTSTRAP_ARCHIVE
cd go/src
./make.bash
GOROOT_BOOTSTRAP=$TMP/go
cd $CWD
# Use Slackware's gcc-go
GOROOT_BOOTSTRAP=/usr
fi
# Get and verify the source archive
@ -83,7 +70,7 @@ if [ ! -r $ARCHIVE ]; then
cd ..
rm -rf gosrc
fi
sha1sum -c $ARCHIVE.sha1
sha256sum -c $ARCHIVE.sha256
# Compile
cd $TMP
@ -91,11 +78,14 @@ echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd go-$VERSION/src
export GOROOT_BOOTSTRAP
TMPDIR=$TMP GOROOT_FINAL=/opt/go ./all.bash
CC=clang TMPDIR=$TMP GOROOT_FINAL=/opt/go ./all.bash
cd ../..
mkdir -p $PKG/opt
mv go-$VERSION $PKG/opt/go
# Remove go-build files
rm -rf $PKG/opt/go/pkg/obj/go-build
# Strip binaries
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null || /bin/true

Loading…
Cancel
Save