aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-02-12 02:33:33 +0900
committerOphestra <cat@gensokyo.uk>2026-02-12 02:33:33 +0900
commit7cd14b88653433c861cd018a67ee11c87f00e01f (patch)
treedf0926ff544494a293a3303a5c6f004abc2749cd /internal/rosa
parent3e18a4b3970b7bf1e7d9fb3e9787a6810bc7d5c5 (diff)
internal/rosa: squashfs-tools artifact
The Makefile is very poorly written, so had to be configured through the environment. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa')
-rw-r--r--internal/rosa/all.go2
-rw-r--r--internal/rosa/squashfs.go41
2 files changed, 43 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index d59e7483..2414a91d 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 00000000..f0ba0cb1
--- /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 }