internal/rosa: kmod artifact
All checks were successful
Test / Create distribution (push) Successful in 1m7s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m18s
Test / ShareFS (push) Successful in 4m21s
Test / Hpkg (push) Successful in 4m50s
Test / Sandbox (race detector) (push) Successful in 5m15s
Test / Hakurei (race detector) (push) Successful in 3m8s
Test / Flake checks (push) Successful in 1m34s
All checks were successful
Test / Create distribution (push) Successful in 1m7s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Successful in 4m18s
Test / ShareFS (push) Successful in 4m21s
Test / Hpkg (push) Successful in 4m50s
Test / Sandbox (race detector) (push) Successful in 5m15s
Test / Hakurei (race detector) (push) Successful in 3m8s
Test / Flake checks (push) Successful in 1m34s
Required by the kernel. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -35,6 +35,7 @@ const (
|
|||||||
HakureiDist
|
HakureiDist
|
||||||
IniConfig
|
IniConfig
|
||||||
KernelHeaders
|
KernelHeaders
|
||||||
|
Kmod
|
||||||
LibXau
|
LibXau
|
||||||
Libexpat
|
Libexpat
|
||||||
Libpsl
|
Libpsl
|
||||||
@@ -139,6 +140,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
|
|||||||
"hakurei-dist": HakureiDist,
|
"hakurei-dist": HakureiDist,
|
||||||
"iniconfig": IniConfig,
|
"iniconfig": IniConfig,
|
||||||
"kernel-headers": KernelHeaders,
|
"kernel-headers": KernelHeaders,
|
||||||
|
"kmod": Kmod,
|
||||||
"libXau": LibXau,
|
"libXau": LibXau,
|
||||||
"libexpat": Libexpat,
|
"libexpat": Libexpat,
|
||||||
"libpsl": Libpsl,
|
"libpsl": Libpsl,
|
||||||
|
|||||||
43
internal/rosa/kmod.go
Normal file
43
internal/rosa/kmod.go
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package rosa
|
||||||
|
|
||||||
|
import "hakurei.app/internal/pkg"
|
||||||
|
|
||||||
|
func (t Toolchain) newKmod() pkg.Artifact {
|
||||||
|
const (
|
||||||
|
version = "34.2"
|
||||||
|
checksum = "0K7POeTKxMhExsaTsnKAC6LUNsRSfe6sSZxWONPbOu-GI_pXOw3toU_BIoqfBhJV"
|
||||||
|
)
|
||||||
|
return t.New("kmod-"+version, 0, []pkg.Artifact{
|
||||||
|
t.Load(Python),
|
||||||
|
t.Load(Meson),
|
||||||
|
t.Load(PkgConfig),
|
||||||
|
t.Load(CMake),
|
||||||
|
t.Load(Ninja),
|
||||||
|
|
||||||
|
t.Load(Zlib),
|
||||||
|
t.Load(Zstd),
|
||||||
|
t.Load(OpenSSL),
|
||||||
|
t.Load(KernelHeaders),
|
||||||
|
}, nil, nil, `
|
||||||
|
cd "$(mktemp -d)"
|
||||||
|
meson setup \
|
||||||
|
--reconfigure \
|
||||||
|
--buildtype=release \
|
||||||
|
--prefix=/system \
|
||||||
|
-Dsysconfdir=/system/etc \
|
||||||
|
-Dbashcompletiondir=no \
|
||||||
|
-Dfishcompletiondir=no \
|
||||||
|
-Dxz=disabled \
|
||||||
|
-Dmanpages=false \
|
||||||
|
. /usr/src/kmod
|
||||||
|
meson compile
|
||||||
|
meson install \
|
||||||
|
--destdir=/work
|
||||||
|
`, pkg.Path(AbsUsrSrc.Append("kmod"), false, pkg.NewHTTPGetTar(
|
||||||
|
nil, "https://www.kernel.org/pub/linux/utils/kernel/"+
|
||||||
|
"kmod/kmod-"+version+".tar.gz",
|
||||||
|
mustDecode(checksum),
|
||||||
|
pkg.TarGzip,
|
||||||
|
)))
|
||||||
|
}
|
||||||
|
func init() { artifactsF[Kmod] = Toolchain.newKmod }
|
||||||
Reference in New Issue
Block a user