aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/squashfs.go
blob: 26a959c29a26e8600f82bdd2ccab562603604230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newSquashfsTools() (pkg.Artifact, string) {
	const (
		version  = "4.7.5"
		checksum = "rF52wLQP-jeAmcD-48wqJcck8ZWRFwkax3T-7snaRf5EBnCQQh0YypMY9lwcivLz"
	)
	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,

		Env: []string{
			"CONFIG=1",
			"XZ_SUPPORT=0",
			"LZO_SUPPORT=0",
			"LZ4_SUPPORT=0",
			"COMP_DEFAULT=zstd",
			"USE_PREBUILT_MANPAGES=y",
		},
		ScriptEarly: "cd squashfs-tools",
	}, &MakeHelper{
		SkipConfigure: true,
		InPlace:       true,

		SkipCheck: true,
		Install:   "make INSTALL_PREFIX=/work/system install",
	},
		Sed,

		Zstd,
		Gzip,
		Zlib,
	), version
}
func init() {
	artifactsM[SquashfsTools] = Metadata{
		f: Toolchain.newSquashfsTools,

		Name:        "squashfs-tools",
		Description: "tools to create and extract Squashfs filesystems",
		Website:     "https://github.com/plougher/squashfs-tools",

		ID: 4879,
	}
}