Skip to content

feat: AUR packaging (mcpp-bin + mcpp) + CI auto-publish#170

Merged
Sunrisepeak merged 1 commit into
mainfrom
feat/aur-packaging
Jun 25, 2026
Merged

feat: AUR packaging (mcpp-bin + mcpp) + CI auto-publish#170
Sunrisepeak merged 1 commit into
mainfrom
feat/aur-packaging

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

What

Adds Arch Linux / AUR support, modeled on install.sh.

Package Installs
mcpp-bin prebuilt release binary (what install.sh downloads) yay -S mcpp-bin
mcpp built from source, bootstrapped with mcpp-bin yay -S mcpp

Both share one /opt/mcpp + /usr/bin/mcpp wrapper layout. The wrapper pins
MCPP_HOME=$HOME/.mcpp and MCPP_VENDORED_XLINGS at the shared bundled xlings,
because mcpp resolves MCPP_HOME from the binary's real path (/proc/self/exe,
symlinks resolved) and writes its registry/caches there at runtime — a plain
/usr/bin symlink would point that at the root-owned install dir and fail.

The mcpp source package is self-hosting: it uses the installed mcpp-bin as
the bootstrap compiler and runs mcpp build --target <arch>-linux-musl, the
same path release.yml ships.

Files

  • scripts/aur/{mcpp-bin,mcpp}/{PKGBUILD,.SRCINFO,mcpp.sh}
  • scripts/aur/update.sh — bump both packages (refresh checksums + .SRCINFO)
  • scripts/aur/README.md — layout rationale + publish flow
  • .github/workflows/aur-publish.yml — auto-publish both packages after the
    release workflow completes
    (workflow_run, so the aarch64 asset the
    mcpp-bin checksum needs already exists). Needs the AUR_SSH_PRIVATE_KEY
    secret.

Verification

  • mcpp-bin package() simulated against the real v0.0.65 tarball: mcpp --version ✓, MCPP_HOME resolves to per-user ~/.mcpp (not /opt) ✓,
    bundled xlings auto-seeded on first run ✓.
  • update.sh idempotent (regenerates byte-identical PKGBUILD/.SRCINFO), fetches
    real release checksums; both packages + the workflow YAML pass syntax/lint.

Add Arch Linux / AUR support modeled on install.sh:

- mcpp-bin: prebuilt release binaries (per-arch x86_64/aarch64 tarballs,
  pinned sha256), the same artifacts install.sh downloads.
- mcpp: built from source, self-hosted via mcpp-bin as the bootstrap
  compiler (mcpp build --target <arch>-linux-musl, like release.yml).

Both share one /opt/mcpp + /usr/bin/mcpp wrapper layout. The wrapper
pins MCPP_HOME=$HOME/.mcpp and MCPP_VENDORED_XLINGS at the shared bundled
xlings, because mcpp resolves MCPP_HOME from the binary's real path
(/proc/self/exe) and writes its registry/caches there at runtime — a plain
/usr/bin symlink would point that at the root-owned install dir.

- scripts/aur/update.sh: bump both packages (refresh checksums + .SRCINFO).
- .github/workflows/aur-publish.yml: push both packages to the AUR after the
  release workflow completes (workflow_run, so per-arch assets exist first).
  Requires the AUR_SSH_PRIVATE_KEY secret.
@Sunrisepeak Sunrisepeak merged commit f0576e7 into main Jun 25, 2026
5 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/aur-packaging branch June 25, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant