Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
8a6ed2ac
Commit
8a6ed2ac
authored
Jun 12, 2017
by
Damian Montero
Committed by
GitHub
Jun 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #703 from jam7/update/go
Update go to 1.8.3 and etc.
parents
9f38190e
d2226341
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
packages/go.rb
packages/go.rb
+23
-13
No files found.
packages/go.rb
View file @
8a6ed2ac
...
...
@@ -3,39 +3,49 @@ require 'package'
class
Go
<
Package
description
'Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.'
homepage
'https://golang.org/'
version
'1.8.
0
'
source_url
'https://storage.googleapis.com/golang/go1.8.src.tar.gz'
source_sha1
'
37945c372140c3a46c2c5b4b9ce382b6c8d88811
'
version
'1.8.
3
'
source_url
'https://storage.googleapis.com/golang/go1.8.
3.
src.tar.gz'
source_sha1
'
7c3b942c58a44396ff1d205d0e6e72770792d626
'
# Tests requires perl
depends_on
'perl'
# go is required to build versions of go > 1.4
if
`which go`
==
''
unless
File
.
exist?
"
#{
CREW_PREFIX
}
/lib/go/bin/go"
depends_on
'go_bootstrap'
end
def
self
.
build
FileUtils
.
cd
(
'src'
)
do
# install with go_bootstrap if go is not in the path
if
`which go`
==
''
system
"GOROOT_BOOTSTRAP=
/usr/local
/lib/go_bootstrap/go \
TMPDIR=
/usr/local
/tmp \
unless
File
.
exist?
"
#{
CREW_PREFIX
}
/lib/go/bin/go"
system
"GOROOT_BOOTSTRAP=
#{
CREW_PREFIX
}
/lib/go_bootstrap/go \
TMPDIR=
#{
CREW_PREFIX
}
/tmp \
./make.bash"
else
system
"GOROOT_BOOTSTRAP=
/usr/local
/lib/go \
TMPDIR=
/usr/local
/tmp ./make.bash"
system
"GOROOT_BOOTSTRAP=
#{
CREW_PREFIX
}
/lib/go \
TMPDIR=
#{
CREW_PREFIX
}
/tmp ./make.bash"
end
end
end
def
self
.
install
dest
=
"
#{
CREW_DEST_DIR
}
/usr/local
/lib/"
dest
=
"
#{
CREW_DEST_DIR
}
#{
CREW_PREFIX
}
/lib/"
system
"mkdir"
,
"-p"
,
dest
FileUtils
.
mv
Dir
.
pwd
,
dest
FileUtils
.
cp_r
Dir
.
pwd
,
dest
puts
"--------"
puts
"Installed Go for
#{
ARCH
}
in
/usr/local
/lib/go"
puts
"Installed Go for
#{
ARCH
}
in
#{
CREW_PREFIX
}
/lib/go"
puts
"Make sure to set go environment variables."
puts
"Minimal:"
puts
"
\t
export GOROOT=
/usr/local
/lib/go"
puts
"
\t
export GOROOT=
#{
CREW_PREFIX
}
/lib/go"
puts
"
\t
export PATH=$PATH:$GOROOT/bin"
puts
"To use `go run`:"
puts
"
\t
export TMPDIR=
#{
CREW_PREFIX
}
/tmp"
end
def
self
.
check
FileUtils
.
cd
(
'src'
)
do
system
"PATH=
\"
#{
Dir
.
pwd
}
/../bin:$PATH
\"
TMPDIR=
\"
#{
CREW_PREFIX
}
/tmp
\"
go tool dist test"
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment