package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newLibmd() (pkg.Artifact, string) {
	const (
		version  = "1.2.0"
		checksum = "1rJ6joAO0wwMZvSfnRNkc1MOhywyAq7SM8VmF92NvDtv7Qdl1LRbjm5fg_DFFtGj"
	)
	return t.NewPackage("libmd", version, t.newTagRemote(
		"https://git.hadrons.org/git/libmd.git",
		version, checksum,
	), nil, &MakeHelper{
		Generate: "echo '" + version + "' > .dist-version && ./autogen",
		ScriptMakeEarly: `
install -D /usr/src/libmd/src/helper.c src/helper.c
`,
	},
		Automake,
		Libtool,
	), version
}
func init() {
	artifactsM[Libmd] = Metadata{
		f: Toolchain.newLibmd,

		Name:        "libmd",
		Description: "Message Digest functions from BSD systems",
		Website:     "https://www.hadrons.org/software/libmd/",

		ID: 15525,
	}
}

func (t Toolchain) newLibbsd() (pkg.Artifact, string) {
	const (
		version  = "0.12.2"
		checksum = "NVS0xFLTwSP8JiElEftsZ-e1_C-IgJhHrHE77RwKt5178M7r087waO-zYx2_dfGX"
	)
	return t.NewPackage("libbsd", version, t.newTagRemote(
		"https://gitlab.freedesktop.org/libbsd/libbsd.git",
		version, checksum,
	), nil, &MakeHelper{
		Generate: "echo '" + version + "' > .dist-version && ./autogen",
	},
		Automake,
		Libtool,

		Libmd,
	), version
}
func init() {
	artifactsM[Libbsd] = Metadata{
		f: Toolchain.newLibbsd,

		Name:        "libbsd",
		Description: "provides useful functions commonly found on BSD systems",
		Website:     "https://libbsd.freedesktop.org/",

		ID: 1567,
	}
}
