diff --git a/internal/rosa/all.go b/internal/rosa/all.go index d59e748..2414a91 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -65,6 +65,7 @@ const ( Rsync Sed Setuptools + SquashfsTools Toybox toyboxEarly Unzip @@ -168,6 +169,7 @@ func ResolveName(name string) (p PArtifact, ok bool) { "rsync": Rsync, "sed": Sed, "setuptools": Setuptools, + "squashfs-tools": SquashfsTools, "toybox": Toybox, "unzip": Unzip, "wayland": Wayland, diff --git a/internal/rosa/squashfs.go b/internal/rosa/squashfs.go new file mode 100644 index 0000000..f0ba0cb --- /dev/null +++ b/internal/rosa/squashfs.go @@ -0,0 +1,41 @@ +package rosa + +import "hakurei.app/internal/pkg" + +func (t Toolchain) newSquashfsTools() pkg.Artifact { + const ( + version = "4.7.4" + checksum = "pG0E_wkRJFS6bvPYF-hTKZT-cWnvo5BbIzCDZrJZVQDgJOx2Vc3ZfNSEV7Di7cSW" + ) + return t.NewViaMake("squashfs-tools", version, t.NewPatchedSource( + "squashfs-tools", version, pkg.NewHTTPGetTar( + nil, "https://github.com/plougher/squashfs-tools/releases/"+ + "download/"+version+"/squashfs-tools-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), false, + ), &MakeAttr{ + Writable: true, + SkipConfigure: true, + InPlace: true, + + Env: []string{ + "CONFIG=1", + "XZ_SUPPORT=0", + "LZO_SUPPORT=0", + "LZ4_SUPPORT=0", + "COMP_DEFAULT=zstd", + "USE_PREBUILT_MANPAGES=y", + }, + ScriptEarly: "cd /usr/src/squashfs-tools/squashfs-tools", + SkipCheck: true, + ScriptInstall: "make INSTALL_PREFIX=/work/system install", + }, + t.Load(Sed), + + t.Load(Zstd), + t.Load(Gzip), + t.Load(Zlib), + ) +} +func init() { artifactsF[SquashfsTools] = Toolchain.newSquashfsTools }