aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/gnu.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/gnu.go')
-rw-r--r--internal/rosa/gnu.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go
new file mode 100644
index 00000000..8fe5b8a6
--- /dev/null
+++ b/internal/rosa/gnu.go
@@ -0,0 +1,25 @@
+package rosa
+
+import "hakurei.app/internal/pkg"
+
+// NewMake returns a [pkg.Artifact] containing an installation of GNU Make.
+func (t Toolchain) NewMake() pkg.Artifact {
+ const (
+ version = "4.4.1"
+ checksum = "YS_B07ZcAy9PbaK5_vKGj64SrxO2VMpnMKfc9I0Q9IC1rn0RwOH7802pJoj2Mq4a"
+ )
+ return t.New("make-"+version, nil, nil, nil, `
+cd "$(mktemp -d)"
+/usr/src/make/configure --prefix=/system \
+ --build="${ROSA_TRIPLE}" \
+ --disable-dependency-tracking
+./build.sh
+./make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("make"), false, pkg.NewHTTPGetTar(
+ nil,
+ "https://ftp.gnu.org/gnu/make/make-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ )))
+
+}