aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/libucontext.go
blob: cf2333e26b348ef21a69c11ba33a5e4b1a008d41 (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
package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newLibucontext() pkg.Artifact {
	const (
		version  = "1.5"
		checksum = "Ggk7FMmDNBdCx1Z9PcNWWW6LSpjGYssn2vU0GK5BLXJYw7ZxZbA2m_eSgT9TFnIG"
	)
	return t.NewPackage("libucontext", version, pkg.NewHTTPGetTar(
		nil, "https://github.com/kaniini/libucontext/archive/refs/tags/"+
			"libucontext-"+version+".tar.gz",
		mustDecode(checksum),
		pkg.TarGzip,
	), &PackageAttr{
		// uses source tree as scratch space
		Writable:    true,
		Chmod:       true,
		EnterSource: true,
	}, &MakeHelper{
		OmitDefaults:  true,
		SkipConfigure: true,
		InPlace:       true,
		Make: []string{
			"ARCH=" + linuxArch(),
		},
		Install: "make prefix=/system DESTDIR=/work install",
	})
}
func init() { artifactsF[Libucontext] = Toolchain.newLibucontext }