internal/rosa: unzip artifact
All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (push) Successful in 2m38s
Test / Hakurei (push) Successful in 3m59s
Test / ShareFS (push) Successful in 4m1s
Test / Hpkg (push) Successful in 4m30s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 5m55s
Test / Flake checks (push) Successful in 1m52s
All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (push) Successful in 2m38s
Test / Hakurei (push) Successful in 3m59s
Test / ShareFS (push) Successful in 4m1s
Test / Hpkg (push) Successful in 4m30s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 5m55s
Test / Flake checks (push) Successful in 1m52s
Because the zip format is too awful and cannot be streamed anyway, supporting it natively comes with no benefit. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -61,6 +61,7 @@ const (
|
|||||||
Setuptools
|
Setuptools
|
||||||
Toybox
|
Toybox
|
||||||
toyboxEarly
|
toyboxEarly
|
||||||
|
Unzip
|
||||||
utilMacros
|
utilMacros
|
||||||
Wayland
|
Wayland
|
||||||
WaylandProtocols
|
WaylandProtocols
|
||||||
@@ -147,6 +148,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
|
|||||||
"sed": Sed,
|
"sed": Sed,
|
||||||
"setuptools": Setuptools,
|
"setuptools": Setuptools,
|
||||||
"toybox": Toybox,
|
"toybox": Toybox,
|
||||||
|
"unzip": Unzip,
|
||||||
"wayland": Wayland,
|
"wayland": Wayland,
|
||||||
"wayland-protocols": WaylandProtocols,
|
"wayland-protocols": WaylandProtocols,
|
||||||
"xcb": XCB,
|
"xcb": XCB,
|
||||||
|
|||||||
34
internal/rosa/unzip.go
Normal file
34
internal/rosa/unzip.go
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
package rosa
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"hakurei.app/internal/pkg"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (t Toolchain) newUnzip() pkg.Artifact {
|
||||||
|
const (
|
||||||
|
version = "6.0"
|
||||||
|
checksum = "fcqjB1IOVRNJ16K5gTGEDt3zCJDVBc7EDSra9w3H93stqkNwH1vaPQs_QGOpQZu1"
|
||||||
|
)
|
||||||
|
return t.New("unzip-"+version, 0, []pkg.Artifact{
|
||||||
|
t.Load(Make),
|
||||||
|
t.Load(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, t.NewPatchedSource(
|
||||||
|
"unzip", version, pkg.NewHTTPGetTar(
|
||||||
|
nil, "https://downloads.sourceforge.net/project/infozip/"+
|
||||||
|
"UnZip%206.x%20%28latest%29/UnZip%20"+version+"/"+
|
||||||
|
"unzip"+strings.ReplaceAll(version, ".", "")+".tar.gz",
|
||||||
|
mustDecode(checksum),
|
||||||
|
pkg.TarGzip,
|
||||||
|
), false,
|
||||||
|
)))
|
||||||
|
}
|
||||||
|
func init() { artifactsF[Unzip] = Toolchain.newUnzip }
|
||||||
Reference in New Issue
Block a user