Files
hakurei/internal/rosa/unzip.go
Ophestra 30eb0d6a61 internal/rosa: key metadata by string
For upcoming azalea integration. The API is quite ugly right now to ease migration.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-17 15:56:53 +09:00

45 lines
1003 B
Go

package rosa
import (
"strings"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newUnzip(s *S) (pkg.Artifact, string) {
const (
version = "6.0"
checksum = "fcqjB1IOVRNJ16K5gTGEDt3zCJDVBc7EDSra9w3H93stqkNwH1vaPQs_QGOpQZu1"
)
return s.New(t, "unzip-"+version, 0, s.AppendPresets(t, nil,
Make,
Coreutils,
), nil, nil, `
cd /usr/src/unzip/
unix/configure
make -f unix/Makefile generic1
mkdir -p /work/system/bin/
mv unzip /work/system/bin/
`, pkg.Path(AbsUsrSrc.Append("unzip"), true, s.NewPatchedSource(t,
"unzip", version, newTar(
"https://downloads.sourceforge.net/project/infozip/"+
"UnZip%206.x%20%28latest%29/UnZip%20"+version+"/"+
"unzip"+strings.ReplaceAll(version, ".", "")+".tar.gz",
checksum,
pkg.TarGzip,
), false,
))), version
}
func init() {
native.MustRegister(&Artifact{
f: Toolchain.newUnzip,
Name: "unzip",
Description: "portable compression/archiver utilities",
Website: "https://infozip.sourceforge.net/",
ID: 8684,
})
}