From 5fa71752fc0051af12fa8e3611c551a351d6cf4d Mon Sep 17 00:00:00 2001 From: caubet_m Date: Wed, 11 Jan 2023 15:14:15 +0100 Subject: [PATCH 1/2] Add Go module --- Programming/go/build | 17 +++++++++++++++++ Programming/go/files/variants.rhel7 | 1 + Programming/go/modulefile | 11 +++++++++++ 3 files changed, 29 insertions(+) create mode 100755 Programming/go/build create mode 100644 Programming/go/files/variants.rhel7 create mode 100644 Programming/go/modulefile diff --git a/Programming/go/build b/Programming/go/build new file mode 100755 index 0000000..c596a09 --- /dev/null +++ b/Programming/go/build @@ -0,0 +1,17 @@ +#!/usr/bin/env modbuild + +pbuild::set_download_url "https://go.dev/dl/go${V_PKG}.src.tar.gz" + +pbuild::add_to_group 'Programming' +pbuild::install_docfiles 'CONTRIBUTING.md' 'LICENSE' 'PATENTS' 'README.md' 'SECURITY.md' 'VERSION' + +pbuild::compile_in_sourcetree + +pbuild::compile() { + cd src + ./all.bash +} + +pbuild::install() { + : +} diff --git a/Programming/go/files/variants.rhel7 b/Programming/go/files/variants.rhel7 new file mode 100644 index 0000000..05a569b --- /dev/null +++ b/Programming/go/files/variants.rhel7 @@ -0,0 +1 @@ +go/1.19.5 unstable diff --git a/Programming/go/modulefile b/Programming/go/modulefile new file mode 100644 index 0000000..fa7ac27 --- /dev/null +++ b/Programming/go/modulefile @@ -0,0 +1,11 @@ +#%Module1.0 + +module-whatis "The Go Programming Language" +module-url "https://go.googlesource.com/go/" +module-license "https://go.googlesource.com/go/+/refs/heads/master/LICENSE" +module-maintainer "Marc Caubet Serrabou " + +module-help " +Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. +" +module-addgroup "Programming" From 1b71a304f661c58ecd31b6e3eb71c9cb1bc8eab4 Mon Sep 17 00:00:00 2001 From: caubet_m Date: Thu, 12 Jan 2023 10:22:46 +0100 Subject: [PATCH 2/2] Update Go module --- Programming/go/build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Programming/go/build b/Programming/go/build index c596a09..e978d8d 100755 --- a/Programming/go/build +++ b/Programming/go/build @@ -8,10 +8,14 @@ pbuild::install_docfiles 'CONTRIBUTING.md' 'LICENSE' 'PATENTS' 'README.md' 'SEC pbuild::compile_in_sourcetree pbuild::compile() { + export GOROOT_FINAL=${PREFIX} + export GOMAXPROCS=8 cd src ./all.bash + cd .. } pbuild::install() { - : + rsync -av --exclude "pkg/obj/*" . "${PREFIX}" } +