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
f34720c8
Commit
f34720c8
authored
Dec 25, 2016
by
Damian Montero
Committed by
GitHub
Dec 25, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #292 from mattddowney/master
Bootstrap Go
parents
53b779f5
4349eacf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
3 deletions
+37
-3
packages/go.rb
packages/go.rb
+15
-3
packages/go_bootstrap.rb
packages/go_bootstrap.rb
+22
-0
No files found.
packages/go.rb
View file @
f34720c8
...
...
@@ -5,11 +5,23 @@ class Go < Package
source_url
'https://storage.googleapis.com/golang/go1.7.4.src.tar.gz'
source_sha1
'0fb305c827c8794cfda7e437befa6101a2d06b2e'
# go is required to build versions of go > 1.4
if
`which 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 \
./make.bash"
else
system
"TMPDIR=/usr/local/tmp ./make.bash"
end
end
end
def
self
.
install
dest
=
"
#{
CREW_DEST_DIR
}
/usr/local/lib/"
...
...
@@ -17,10 +29,10 @@ class Go < Package
FileUtils
.
mv
Dir
.
pwd
,
dest
puts
"--------"
puts
"Installed Go for
linux/amd64
in /usr/local/lib/go"
puts
"Installed Go for
#{
ARCH
}
in /usr/local/lib/go"
puts
"Make sure to set go environment variables."
puts
"Minimal:"
puts
"
\t
export GOROOT=/usr/local/lib/go"
puts
"
\t
export PATH=$GOROOT/bin"
puts
"
\t
export PATH=$
PATH:$
GOROOT/bin"
end
end
packages/go_bootstrap.rb
0 → 100644
View file @
f34720c8
require
'package'
class
Go_bootstrap
<
Package
version
'1.4'
source_url
'https://storage.googleapis.com/golang/go1.4-bootstrap-20161024.tar.gz'
source_sha1
'47e02e41aa99dea899b65ebf7b50ec706141be8c'
def
self
.
build
FileUtils
.
cd
(
'src'
)
do
system
"TMPDIR=/usr/local/tmp ./make.bash"
end
end
def
self
.
install
dest
=
"
#{
CREW_DEST_DIR
}
/usr/local/lib/go_bootstrap"
system
"mkdir"
,
"-p"
,
dest
FileUtils
.
mv
Dir
.
pwd
,
dest
puts
"--------"
puts
"Installed Go_bootstrap for
#{
ARCH
}
in /usr/local/lib/go_bootstrap"
end
end
\ No newline at end of file
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