|
1 | 1 | # AUR packaging |
2 | 2 |
|
3 | | -Arch Linux packaging for mcpp. Two packages, same runtime layout: |
| 3 | +Arch Linux packaging for mcpp. Three packages, same runtime layout: |
4 | 4 |
|
5 | 5 | | Package | What it installs | Pick it when | |
6 | 6 | | --- | --- | --- | |
7 | 7 | | [`mcpp-bin`](mcpp-bin/) | the **prebuilt** release binary (what [`install.sh`](../../install.sh) downloads) | you just want mcpp, fast | |
8 | | -| [`mcpp-m`](mcpp-m/) | mcpp **built from source**, bootstrapped with `mcpp-bin` | you want a from-source build | |
| 8 | +| [`mcpp-m`](mcpp-m/) | mcpp **built from source**, bootstrapped with `mcpp-bin` | you want a from-source build of a release | |
| 9 | +| [`mcpp-git`](mcpp-git/) | mcpp **built from the git master**, bootstrapped with `mcpp-bin` | you want to track master (rolling) and never lag the index floor | |
9 | 10 |
|
10 | 11 | ```sh |
11 | 12 | yay -S mcpp-bin # prebuilt |
12 | 13 | yay -S mcpp-m # from source (pulls mcpp-bin as a build dep) |
| 14 | +yay -S mcpp-git # from git master (pulls mcpp-bin as a build dep) |
13 | 15 | ``` |
14 | 16 |
|
15 | | -The two `conflict` with each other, so only one can be installed at a time. |
| 17 | +The three `conflict` with each other, so only one can be installed at a time. |
16 | 18 | Supported architectures: `x86_64`, `aarch64`. |
17 | 19 |
|
18 | 20 | ### Why not just `mcpp`? |
19 | 21 |
|
20 | 22 | The name `mcpp` is already taken by **`extra/mcpp`** — Matsui's C preprocessor, |
21 | 23 | an unrelated long-standing official Arch package that owns `/usr/bin/mcpp`. The |
22 | 24 | AUR refuses to host any package whose `pkgname` (or `provides`) collides with an |
23 | | -official-repo package, so our packages are `mcpp-bin` / `mcpp-m`. They still |
24 | | -install the `mcpp` command at `/usr/bin/mcpp`, so both `conflicts=('mcpp')` with |
25 | | -that preprocessor — you can have our mcpp or the preprocessor, not both. |
| 25 | +official-repo package, so our packages are `mcpp-bin` / `mcpp-m` / `mcpp-git`. |
| 26 | +They still install the `mcpp` command at `/usr/bin/mcpp`, so all three |
| 27 | +`conflicts=('mcpp')` with that preprocessor — you can have our mcpp or the |
| 28 | +preprocessor, not both. |
26 | 29 |
|
27 | 30 | ## Layout & why the wrapper exists |
28 | 31 |
|
@@ -52,30 +55,39 @@ user already exported, so a custom home or xlings still works. |
52 | 55 | First `mcpp build`/`mcpp run` bootstraps the sandbox (downloads ninja, patchelf |
53 | 56 | and the default toolchain into `~/.mcpp`) — expected, and only once per user. |
54 | 57 |
|
55 | | -### How the `mcpp-m` source package builds |
| 58 | +### How the `mcpp-m` / `mcpp-git` source packages build |
56 | 59 |
|
57 | | -mcpp is self-hosting. The `mcpp-m` PKGBUILD uses the installed `mcpp-bin` as the |
58 | | -bootstrap compiler and runs `mcpp build --target <arch>-linux-musl` — the same |
| 60 | +mcpp is self-hosting. Both source PKGBUILDs use the installed `mcpp-bin` as the |
| 61 | +bootstrap compiler and run `mcpp build --target <arch>-linux-musl` — the same |
59 | 62 | path [`release.yml`](../../.github/workflows/release.yml) ships. mcpp downloads |
60 | 63 | its own pinned toolchain (it does **not** use the host gcc), so the build needs |
61 | 64 | network access, like the upstream release build. |
62 | 65 |
|
| 66 | +`mcpp-m` builds a pinned release tarball; `mcpp-git` checks out `master` from |
| 67 | +the official repo (`source = mcpp::git+…`, `sha256sums = SKIP`) and derives a |
| 68 | +monotonic `pkgver` from `git describe` (tag + commit distance). Because it |
| 69 | +tracks master, `mcpp-git` can never lag the index floor the way `mcpp-bin` does |
| 70 | +between releases — at the cost of tracking bleeding-edge master. |
| 71 | + |
63 | 72 | ## Files |
64 | 73 |
|
65 | 74 | ``` |
66 | 75 | scripts/aur/ |
67 | 76 | README.md this file |
68 | | - update.sh bump BOTH packages to a release version |
| 77 | + update.sh bump the release-pinned packages (mcpp-bin, mcpp-m) |
69 | 78 | mcpp-bin/{PKGBUILD, .SRCINFO, mcpp.sh} |
70 | 79 | mcpp-m/{PKGBUILD, .SRCINFO, mcpp.sh} |
| 80 | + mcpp-git/{PKGBUILD, .SRCINFO, mcpp.sh} |
71 | 81 | ``` |
72 | 82 |
|
73 | | -`mcpp.sh` is identical in both dirs (each AUR repo must be self-contained); |
74 | | -`update.sh` keeps them in sync. |
| 83 | +`mcpp.sh` is identical in all three dirs (each AUR repo must be self-contained); |
| 84 | +`update.sh` keeps `mcpp-bin`/`mcpp-m` in sync. `mcpp-git` has no checksums to |
| 85 | +bump (VCS source) and is not touched by `update.sh`. |
75 | 86 |
|
76 | 87 | ## Releasing a new version |
77 | 88 |
|
78 | | -After a GitHub release is published (and mirrored), bump both packages: |
| 89 | +After a GitHub release is published (and mirrored), bump the release-pinned |
| 90 | +packages (`mcpp-bin`, `mcpp-m`; `mcpp-git` tracks master and needs no bump): |
79 | 91 |
|
80 | 92 | ```sh |
81 | 93 | scripts/aur/update.sh # uses [package].version from mcpp.toml |
|
0 commit comments