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

import (
	"hakurei.app/internal/pkg"
)

func (t Toolchain) newGit() pkg.Artifact {
	const (
		version  = "2.52.0"
		checksum = "uH3J1HAN_c6PfGNJd2OBwW4zo36n71wmkdvityYnrh8Ak0D1IifiAvEWz9Vi9DmS"
	)
	return t.New("git-"+version, 0, stage3Concat(t, []pkg.Artifact{},
		t.Load(Make),
		t.Load(Gawk),
		t.Load(Coreutils),
		t.Load(Perl),
		t.Load(M4),
		t.Load(Autoconf),
		t.Load(Gettext),

		t.Load(Zlib),
	), nil, nil, `
cd /usr/src/git
make configure
./configure --prefix=/system
make "-j$(nproc)" all
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("git"), true, t.NewPatchedSource(
		"git", version, pkg.NewHTTPGetTar(
			nil, "https://www.kernel.org/pub/software/scm/git/"+
				"git-"+version+".tar.gz",
			mustDecode(checksum),
			pkg.TarGzip,
		), false,
	)))
}
func init() { artifactsF[Git] = Toolchain.newGit }