internal/rosa/package: migrate unzip
All checks were successful
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m46s
Test / ShareFS (push) Successful in 3m45s
Test / Hakurei (push) Successful in 3m50s
Test / Sandbox (race detector) (push) Successful in 5m18s
Test / Hakurei (race detector) (push) Successful in 3m25s
Test / Flake checks (push) Successful in 1m21s

This is now possible via the generic helper.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-20 06:21:49 +09:00
parent 7770ccf0aa
commit 4bec0b890c
2 changed files with 34 additions and 42 deletions

View File

@@ -0,0 +1,34 @@
package unzip {
description = "portable compression/archiver utilities";
website = "https://infozip.sourceforge.net";
anitya = 8684;
version* = "6.0";
source = remoteTar {
url = "https://downloads.sourceforge.net/project/infozip/"+
"UnZip%206.x%20%28latest%29/UnZip%20"+version+"/"+
"unzip"+replace {
s = version;
old = ".";
}+".tar.gz";
checksum = "fcqjB1IOVRNJ16K5gTGEDt3zCJDVBc7EDSra9w3H93stqkNwH1vaPQs_QGOpQZu1";
compress = gzip;
};
writable = true;
chmod = true;
exec = generic {
build = `unix/configure
make -f unix/Makefile generic1`;
install = `
mkdir -p /work/system/bin/
mv unzip /work/system/bin/
`;
};
inputs = [
make,
coreutils,
];
}

View File

@@ -1,42 +0,0 @@
package rosa
import (
"strings"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newUnzip() (pkg.Artifact, string) {
const (
version = "6.0"
checksum = "fcqjB1IOVRNJ16K5gTGEDt3zCJDVBc7EDSra9w3H93stqkNwH1vaPQs_QGOpQZu1"
)
return t.New("unzip-"+version, 0, t.Append(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, t.NewPatchedSource(
"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(Toolchain.newUnzip, &Metadata{
Name: "unzip",
Description: "portable compression/archiver utilities",
Website: "https://infozip.sourceforge.net/",
ID: 8684,
})
}