Last active
July 24, 2018 13:30
-
-
Save ocaisa/1057ca936273db6715768fcb9b4b9191 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
easyblock = 'Binary' | |
name = 'Go-Example' | |
version = '20180724' | |
commit_id = '46695d8' | |
homepage = 'https://github.com/golang/example' | |
description = """This repository contains a collection of Go programs and libraries that demonstrate the language, standard libraries, and tools.""" | |
toolchain = {'name': 'GCCcore', 'version': '7.3.0'} | |
source_urls = ['https://github.com/golang/example/archive/'] | |
sources = ['%s.tar.gz' % commit_id] | |
buildininstalldir = True | |
extract_sources = True | |
builddependencies = [ | |
('binutils', '2.30'), | |
] | |
dependencies = [ | |
('Go', '1.10.3', '', True), | |
] | |
# The sources are expected in a very particular place | |
unpack_options = '&& mkdir -p %(installdir)s/src/github.com/golang&& mv example-* %(installdir)s/src/github.com/golang/example' | |
# Update GOPATH so install location is correct | |
install_cmd = "export GOPATH=%(installdir)s:$GOPATH &&" | |
# Update PATH to include new bin directory (in case it is needed) | |
install_cmd += "export PATH=%(installdir)s/bin:$PATH &&" | |
# Do the stringutils installation | |
install_cmd += "cd %(installdir)s/src/github.com/golang/example/stringutil &&" | |
install_cmd += "go build && go install &&" | |
# Do the hello installation | |
install_cmd += "cd %(installdir)s/src/github.com/golang/example/hello &&" | |
install_cmd += "go build && go install" | |
modextrapaths = { | |
'GOPATH': ['.'], | |
} | |
sanity_check_paths = { | |
'files': ['bin/hello'], | |
'dirs': ['bin', 'src', 'pkg'], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment