go-talimat
This commit is contained in:
parent
1e032ec47d
commit
3bbe94b316
|
@ -0,0 +1,16 @@
|
|||
Notes
|
||||
=====
|
||||
|
||||
You must have ``CONFIG_IP_MULTICAST`` enabled in your kernel
|
||||
for several of the go tests to pass and the buidl to
|
||||
succeed.
|
||||
|
||||
You probably want to ensure you have
|
||||
the following setup either temporarily
|
||||
in your ``$HOME/.bashrc`` or ``$HOME/.profile``
|
||||
or ``/etc/profile`` or similar.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
export GOROOT=/usr/lib/go
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
export GOROOT=/usr/lib/go
|
|
@ -0,0 +1,56 @@
|
|||
# Description: The GO programming language
|
||||
# URL: http://golang.org/
|
||||
# Maintainer: James Mills, prologic at shortcircuit dot net dot au
|
||||
# packager: milisarge@gmail.com
|
||||
# Depends on: git mercurial
|
||||
|
||||
name=go
|
||||
version=1.4.2
|
||||
release=1
|
||||
source=(
|
||||
https://storage.googleapis.com/golang/${name}${version}.linux-amd64.tar.gz
|
||||
golang.sh
|
||||
)
|
||||
|
||||
build() {
|
||||
cd $SRC/$name/src
|
||||
|
||||
# build
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
export GOROOT=/tmp/go/
|
||||
|
||||
# compile all
|
||||
unset CC # The build fails with a customer C compiler (e.g: ccache)
|
||||
unset CXX # The build fails with a customer C++ compiler (e.g: ccache)
|
||||
./make.bash
|
||||
|
||||
# install
|
||||
install -d -m 755 $PKG/usr/lib
|
||||
install -d -m 755 $PKG/usr
|
||||
|
||||
# package
|
||||
mv $SRC/go $PKG/usr/lib/
|
||||
mv $PKG/usr/lib/go/bin $PKG/usr/
|
||||
install -D -m 644 $SRC/golang.sh $PKG/etc/profile.d/golang.sh
|
||||
|
||||
#
|
||||
# package godoc and vet (XXX: Temporary)
|
||||
#
|
||||
|
||||
export GOROOT=$PKG/usr/lib/go
|
||||
export GOPATH=/tmp/go
|
||||
|
||||
$PKG/usr/bin/go get -u golang.org/x/tools/cmd/godoc
|
||||
$PKG/usr/bin/go install golang.org/x/tools/cmd/godoc
|
||||
|
||||
$PKG/usr/bin/go get -u golang.org/x/tools/cmd/vet
|
||||
$PKG/usr/bin/go install golang.org/x/tools/cmd/godoc
|
||||
|
||||
# cleanup
|
||||
rm -rf $PKG/usr/lib/go/bin
|
||||
rm -rf $PKG/usr/lib/go/test
|
||||
find "$PKG/usr/lib/go/" -type f -name "*.o" -delete
|
||||
find "$PKG/usr/lib/go/" -type f -name "Makefile" -delete
|
||||
rm $PKG/usr/lib/go/{AUTHORS,README,LICENSE,CONTRIBUTORS,PATENTS,robots.txt}
|
||||
rm $PKG/usr/lib/go/src/{make.*,all.*,run.*,race.*,clean.*,Make.*,sudo.*}
|
||||
}
|
Loading…
Reference in New Issue