diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-16 13:17:56 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-16 13:49:13 +0900 |
| commit | 67b2914c94de1d35f72fc43a8051056afc8d53e9 (patch) | |
| tree | 944cbd6a521e9fb0117e0ae59a0121b0784a883f /internal/rosa/kmod.go | |
| parent | 74dee118227cd72a2679f8eb167b43a1b165a415 (diff) | |
internal/rosa: meson helper
This is used by quite a few projects.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/kmod.go')
| -rw-r--r-- | internal/rosa/kmod.go | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/internal/rosa/kmod.go b/internal/rosa/kmod.go index 2ac319dc..5be48732 100644 --- a/internal/rosa/kmod.go +++ b/internal/rosa/kmod.go @@ -7,36 +7,27 @@ func (t Toolchain) newKmod() pkg.Artifact { 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), + return t.NewViaMeson("kmod", version, pkg.NewHTTPGetTar( + nil, "https://www.kernel.org/pub/linux/utils/kernel/"+ + "kmod/kmod-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), &MesonAttr{ + Configure: [][2]string{ + {"Dsysconfdir", "/system/etc"}, + {"Dbashcompletiondir", "no"}, + {"Dfishcompletiondir", "no"}, + {"Dxz", "disabled"}, + {"Dmanpages", "false"}, + }, + // makes assumptions about the running kernel + SkipCheck: true, + }, t.Load(Zlib), t.Load(Zstd), t.Load(OpenSSL), t.Load(KernelHeaders), - }, nil, nil, ` -cd "$(mktemp -d)" -meson setup \ - --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 } |
