Last active
February 3, 2026 20:55
-
-
Save bunkbail/5308d86587d2159fd88f42b0745bb3e2 to your computer and use it in GitHub Desktop.
cports/main/linux-cachyos-bin/template.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pkgname = "linux-cachyos-bin" | |
| pkgver = "6.18.1" | |
| pkgrel = 0 # APK pkgrel | |
| _src_rel = "2" # Arch Linux pkgrel | |
| archs = ["x86_64"] | |
| pkgdesc = "CachyOS kernel repackaged from Arch Linux" | |
| url = "https://cachyos.org" | |
| license = "GPL-2.0-only" | |
| options = ["!check", "!debug", "!strip", "!scanshlibs", "!scanrundeps", "!lto", "textrels", "execstack", "foreignelf"] | |
| _srcname = pkgname.removesuffix("-bin") | |
| _repo = "https://mirror.cachyos.org/repo/x86_64_v3/cachyos-v3" | |
| _tag = f"{pkgver}-{_src_rel}-x86_64_v3" | |
| source = [ | |
| f"{_repo}/{_srcname}-{_tag}.pkg.tar.zst", | |
| f"{_repo}/{_srcname}-headers-{_tag}.pkg.tar.zst", | |
| ] | |
| sha256 = [ | |
| "c8a695c47b77b2488e0d75ce225bf3a287222da151333cecfecdfdc891ce9dcc", # Kernel | |
| "793033c1c9fed0affccff0f4d1aa7d1f10f01112fb494b78b762aa217cf97f4c", # Headers | |
| ] | |
| depends = ["base-kernel"] | |
| provides = ["linux"] | |
| def install(self): | |
| krel = next((self.cwd / "usr/lib/modules").iterdir()).name | |
| # 1. Copy modules/headers 2. Move vmlinuz 3. Find and copy config | |
| self.cp("usr", self.destdir, recursive=True) | |
| self.install_file(f"usr/lib/modules/{krel}/vmlinuz", "boot", name=f"vmlinuz-{krel}") | |
| self.install_file(next(self.cwd.rglob(".config")), "boot", name=f"config-{krel}") | |
| # 4. Cleanup | |
| for f in ["build", "source", "pkgbase", "vmlinuz"]: | |
| self.rm(self.destdir / f"usr/lib/modules/{krel}/{f}", recursive=True, force=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment