package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newFakeroot() (pkg.Artifact, string) {
	const (
		version  = "1.37.2"
		checksum = "4ve-eDqVspzQ6VWDhPS0NjW3aSenBJcPAJq_BFT7OOFgUdrQzoTBxZWipDAGWxF8"
	)
	return t.NewPackage("fakeroot", version, newFromGitLab(
		"salsa.debian.org",
		"clint/fakeroot",
		"upstream/"+version,
		checksum,
	), &PackageAttr{
		Patches: []KV{
			{"remove-broken-docs", `diff --git a/doc/Makefile.am b/doc/Makefile.am
index f135ad9..85c784c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,4 @@
 AUTOMAKE_OPTIONS=foreign
-SUBDIRS = de es fr nl pt ro sv
 
 man_MANS = faked.1 fakeroot.1
 
`},
		},

		Env: []string{
			"CONFIG_SHELL=/bin/sh",
		},
	}, &MakeHelper{
		Generate: "./bootstrap",

		// makes assumptions about /etc/passwd
		SkipCheck: true,
	},
		Automake,
		Libtool,
		PkgConfig,

		Attr,
		Libcap,
		KernelHeaders,
	), version
}
func init() {
	artifactsM[Fakeroot] = Metadata{
		f: Toolchain.newFakeroot,

		Name:        "fakeroot",
		Description: "tool for simulating superuser privileges",
		Website:     "https://salsa.debian.org/clint/fakeroot",

		ID: 12048,
	}
}
