new go port
This commit is contained in:
parent
9b2ba843bd
commit
6f0a3365a8
|
@ -0,0 +1 @@
|
|||
.*
|
|
@ -0,0 +1,38 @@
|
|||
# Description: The Go Programming Language
|
||||
# URL: https://go.dev/
|
||||
# Maintainer: Alexander Zhirov
|
||||
|
||||
name=go
|
||||
version=1.22.1
|
||||
release=1
|
||||
source=(
|
||||
https://golang.org/dl/go${version}.src.tar.gz
|
||||
https://golang.org/dl/go${version}.linux-amd64.tar.gz
|
||||
)
|
||||
|
||||
unpack_source() {
|
||||
install -d $SRC/go${version}
|
||||
bsdtar -xf $PKGMK_SOURCE_DIR/go${version}.linux-amd64.tar.gz \
|
||||
-C $SRC/go${version} --strip-components=1
|
||||
bsdtar -xf $PKGMK_SOURCE_DIR/go${version}.src.tar.gz \
|
||||
-C $SRC
|
||||
}
|
||||
|
||||
build() {
|
||||
export GOCACHE=$SRC/go-build
|
||||
export GOROOT_BOOTSTRAP=$SRC/go${version}
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
|
||||
cd go/src
|
||||
./make.bash
|
||||
|
||||
install -d $PKG/usr/lib
|
||||
mv $SRC/go $PKG/usr/lib/
|
||||
|
||||
install -d $PKG/usr/bin
|
||||
ln -s /usr/lib/go/bin/go $PKG/usr/bin/
|
||||
ln -s /usr/lib/go/bin/gofmt $PKG/usr/bin/
|
||||
|
||||
find $PKG \( -name "README*" -o -name "AUTHORS" -o -name "TODO" \) -delete
|
||||
rm $PKG/usr/lib/go/src/*.bat
|
||||
}
|
Loading…
Reference in New Issue