diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-01 23:54:40 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-02 01:24:50 +0900 |
| commit | cc60e0d15d79916a69c8a1caeb3c4611351bb6c4 (patch) | |
| tree | 67f4f59ed7ba7b18af51338e56ffa8d9acf52da6 /internal/rosa/squashfs.go | |
| parent | 9deaf853f0676ee4475468bffd35aae7e1160a74 (diff) | |
internal/rosa/make: migrate to helper interface
This also updates all affected artifacts to use new behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/squashfs.go')
| -rw-r--r-- | internal/rosa/squashfs.go | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/internal/rosa/squashfs.go b/internal/rosa/squashfs.go index f0ba0cb1..8d0c0203 100644 --- a/internal/rosa/squashfs.go +++ b/internal/rosa/squashfs.go @@ -7,17 +7,16 @@ func (t Toolchain) newSquashfsTools() pkg.Artifact { 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, + return t.NewPackage("squashfs-tools", version, pkg.NewHTTPGetTar( + nil, "https://github.com/plougher/squashfs-tools/releases/"+ + "download/"+version+"/squashfs-tools-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), &PackageAttr{ + // uses source tree as scratch space + Writable: true, + Chmod: true, + EnterSource: true, Env: []string{ "CONFIG=1", @@ -27,15 +26,19 @@ func (t Toolchain) newSquashfsTools() pkg.Artifact { "COMP_DEFAULT=zstd", "USE_PREBUILT_MANPAGES=y", }, - ScriptEarly: "cd /usr/src/squashfs-tools/squashfs-tools", - SkipCheck: true, - ScriptInstall: "make INSTALL_PREFIX=/work/system install", + }, &MakeHelper{ + + SkipConfigure: true, + InPlace: true, + + SkipCheck: true, + Install: "make INSTALL_PREFIX=/work/system install", }, - t.Load(Sed), + Sed, - t.Load(Zstd), - t.Load(Gzip), - t.Load(Zlib), + Zstd, + Gzip, + Zlib, ) } func init() { artifactsF[SquashfsTools] = Toolchain.newSquashfsTools } |
