返回 CodeWhale
README.md
根目录 / packaging / aur / README.md
1 # AUR packaging for Codewhale
2
3 `codewhale-bin` installs the prebuilt `codewhale` runtime and its `codew`
4 convenience command from the same Linux archives published for each Codewhale
5 release. It does not compile a fork or carry a separate Codewhale version.
6
7 The AUR repository is a separate publication destination. This directory is
8 the upstream source of its `PKGBUILD` and `.SRCINFO`, but the files with those
9 final names are generated only after the matching release archives and
10 checksum manifests exist. Nothing here publishes to AUR.
11
12 ## Render a release update
13
14 From a checkout whose `Cargo.toml` has the released `X.Y.Z` workspace version,
15 obtain the complete, verified `codewhale-release-assets` directory and run:
16
17 ```bash
18 ./packaging/aur/render.sh /path/to/release-assets /tmp/codewhale-bin
19 ```
20
21 The renderer:
22
23 - reads `pkgver` from `[workspace.package]` rather than accepting a second
24 product version;
25 - requires the x64 and arm64 Linux archives under their canonical release
26 names;
27 - requires both release checksum manifests to agree with each other and with
28 the archive bytes;
29 - inserts real SHA-256 values for both archives and the tagged MIT license;
30 - rejects unresolved placeholders, `SKIP`, malformed archives, and non-empty
31 output directories; and
32 - compares the rendered `.SRCINFO` with `makepkg --printsrcinfo` when `makepkg`
33 is available.
34
35 The initial AUR revision for each upstream release is `pkgrel=1`. A recipe-only
36 correction may use a higher Arch package revision without changing Codewhale's
37 semantic version:
38
39 ```bash
40 ./packaging/aur/render.sh /path/to/release-assets /tmp/codewhale-bin 2
41 ```
42
43 Do not invent checksums before release artifacts exist, use `SKIP`, or copy
44 hashes from an older release.
45
46 ## Validate on Arch or Omarchy
47
48 Review the generated files, then validate them in an unprivileged clean build
49 environment:
50
51 ```bash
52 cd /tmp/codewhale-bin
53 makepkg --verifysource
54 makepkg --printsrcinfo | cmp - .SRCINFO
55 makepkg --cleanbuild
56 namcap PKGBUILD codewhale-bin-*.pkg.tar.zst
57 ```
58
59 Inspect the package contents before installation. They should contain
60 `/usr/bin/codewhale`, `/usr/bin/codew`, the existing `codewhale-tui`
61 compatibility symlink to `codewhale`, and the MIT license. After a test install,
62 verify the canonical entrypoints report `X.Y.Z` and the compatibility symlink
63 resolves to the same runtime.
64
65 Publishing the generated files to the `codewhale-bin` AUR repository requires
66 separate authorization from an AUR maintainer. Regenerate `.SRCINFO` whenever
67 package metadata changes, and never publish this recipe before the matching
68 Codewhale tag, archives, and checksum manifests are public and verified.
69
70 Arch's `PKGBUILD(5)` contract defines architecture-specific sources and
71 checksums, and the AUR requires `.SRCINFO` to accompany metadata changes:
72
73 - <https://man.archlinux.org/man/PKGBUILD.5.en>
74 - <https://wiki.archlinux.org/title/.SRCINFO>
75 - <https://wiki.archlinux.org/title/AUR_submission_guidelines>
76
76 lines MARKDOWN