diff --git a/internal/rosa/all.go b/internal/rosa/all.go index 5cffdbe..8bab65a 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -24,6 +24,7 @@ const ( Git Go Gperf + Gzip Hakurei HakureiDist IniConfig @@ -100,6 +101,7 @@ func (t Toolchain) ResolveName(name string) (p PArtifact, ok bool) { "git": Git, "go": Go, "gperf": Gperf, + "gzip": Gzip, "hakurei": Hakurei, "hakurei-dist": HakureiDist, "iniconfig": IniConfig, diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 0160e63..e414247 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -79,6 +79,29 @@ make DESTDIR=/work install } func init() { artifactsF[Autoconf] = Toolchain.newAutoconf } +func (t Toolchain) newGzip() pkg.Artifact { + const ( + version = "1.14" + checksum = "NWhjUavnNfTDFkZJyAUonL9aCOak8GVajWX2OMlzpFnuI0ErpBFyj88mz2xSjz0q" + ) + return t.New("gzip-"+version, false, []pkg.Artifact{ + t.Load(Make), + }, nil, nil, ` +cd "$(mktemp -d)" +/usr/src/gzip/configure \ + --prefix=/system \ + --build="${ROSA_TRIPLE}" +make "-j$(nproc)" +make DESTDIR=/work install +`, pkg.Path(AbsUsrSrc.Append("gzip"), false, pkg.NewHTTPGetTar( + nil, + "https://ftp.gnu.org/gnu/gzip/gzip-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ))) +} +func init() { artifactsF[Gzip] = Toolchain.newGzip } + func (t Toolchain) newGettext() pkg.Artifact { const ( version = "0.26" diff --git a/internal/rosa/toybox.go b/internal/rosa/toybox.go index f2e83a0..8ca02e6 100644 --- a/internal/rosa/toybox.go +++ b/internal/rosa/toybox.go @@ -10,6 +10,7 @@ func (t Toolchain) newToybox() pkg.Artifact { return t.New("toybox-"+version, false, stage3Concat(t, []pkg.Artifact{}, t.Load(Make), t.Load(Bash), + t.Load(Gzip), t.Load(KernelHeaders), ), nil, stage3Concat(t, []string{},