From 5b0c399c39b282b76dbdb5a0d1431709ed94bad6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 14:49:46 +0000 Subject: [PATCH 1/4] README: install on Arch via makepkg from the PKGBUILD Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MD4jNoeKcKQc8pkZyJTepc --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f0bbd6e..bbbe402 100644 --- a/README.md +++ b/README.md @@ -154,12 +154,23 @@ only; pair with `tools/mockstream.py` to develop with no hardware). ### Installing `make install` (respects `DESTDIR` and `PREFIX`, default `/usr`) installs the -binary, a desktop entry, and the icon. Arch users can build a package from -`packaging/aur/PKGBUILD`; prebuilt static binaries are on the +binary, a desktop entry, and the icon. Prebuilt static binaries are on the [releases page](https://github.com/crustovsky/C64UV/releases). Set `C64U_HOST` in your environment if you launch it from the desktop menu rather than a terminal. +On Arch, build a pacman package from the included PKGBUILD. It fetches the +release tag it points at, runs the tests, and installs through pacman, so +`pacman -R c64uv` removes it cleanly: + +```sh +git clone https://github.com/crustovsky/C64UV.git +cd C64UV/packaging/aur +makepkg -si +``` + +To upgrade, `git pull` and run `makepkg -si` again. + ## Limitations - On current official firmware, typed input goes through the KERNAL keyboard From 6ba9b8e1f54347ba0ebf822a82a925ee3efad437 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 14:51:39 +0000 Subject: [PATCH 2/4] Release: build and attach a pacman package New arch-package job builds packaging/aur/PKGBUILD in an Arch container, pointed at the pushed tag, and uploads the .pkg.tar.zst to the release. README documents installing it with pacman -U. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MD4jNoeKcKQc8pkZyJTepc --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ CLAUDE.md | 4 +++- README.md | 12 +++++----- packaging/aur/PKGBUILD | 1 + 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1eed49..7b8c721 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,3 +89,45 @@ jobs: with: name: c64uv-linux-x86_64 path: c64uv-*-linux-x86_64.tar.gz + + arch-package: + runs-on: ubuntu-latest + container: archlinux:latest + steps: + - name: Install build dependencies + run: pacman -Syu --noconfirm base-devel github-cli sdl3 curl iputils hicolor-icon-theme + + - uses: actions/checkout@v4 + + # On a tag, build that tag: the in-tree PKGBUILD still points at the + # previous release until it is bumped afterwards. + - name: Point PKGBUILD at the tag + if: startsWith(github.ref, 'refs/tags/') + working-directory: packaging/aur + run: | + sed -i "s/^pkgver=.*/pkgver=${GITHUB_REF_NAME#v}/; s/^pkgrel=.*/pkgrel=1/" PKGBUILD + sed -i "s/^sha256sums=.*/sha256sums=('SKIP')/" PKGBUILD + + - name: Build package + working-directory: packaging/aur + run: | + useradd -m builder + chown -R builder . + su builder -c "makepkg --noconfirm" + + - name: Upload to release + if: startsWith(github.ref, 'refs/tags/') + working-directory: packaging/aur + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: | + gh release create "$GITHUB_REF_NAME" --generate-notes || true + gh release upload "$GITHUB_REF_NAME" c64uv-*.pkg.tar.zst --clobber + + - name: Upload artifact (non-tag runs) + if: "!startsWith(github.ref, 'refs/tags/')" + uses: actions/upload-artifact@v4 + with: + name: c64uv-arch-package + path: packaging/aur/c64uv-*.pkg.tar.zst diff --git a/CLAUDE.md b/CLAUDE.md index 8cc31b6..7c426a1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,7 +33,9 @@ Packaging: `make install` (DESTDIR/PREFIX) installs the binary plus `tools/genicon.py`, which rasterises font8x8.h - never hand-edit the SVG). `packaging/aur/PKGBUILD` builds from the GitHub tag tarball, so it can only reference tags that already contain the packaging files; bump `pkgver` and -`sha256sums` on release. `SDL_SetAppMetadata` identifier and the desktop +`sha256sums` on release (the release workflow builds the .pkg.tar.zst from +the pushed tag itself, overriding pkgver, so a stale PKGBUILD never blocks +it). `SDL_SetAppMetadata` identifier and the desktop file basename must both stay `c64uv` or desktops lose the window icon. ``` diff --git a/README.md b/README.md index bbbe402..d7e8f0e 100644 --- a/README.md +++ b/README.md @@ -159,17 +159,15 @@ binary, a desktop entry, and the icon. Prebuilt static binaries are on the in your environment if you launch it from the desktop menu rather than a terminal. -On Arch, build a pacman package from the included PKGBUILD. It fetches the -release tag it points at, runs the tests, and installs through pacman, so -`pacman -R c64uv` removes it cleanly: +On Arch, each release also ships a pacman package. Download +`c64uv--1-x86_64.pkg.tar.zst` from the releases page and install it: ```sh -git clone https://github.com/crustovsky/C64UV.git -cd C64UV/packaging/aur -makepkg -si +sudo pacman -U c64uv-*-x86_64.pkg.tar.zst ``` -To upgrade, `git pull` and run `makepkg -si` again. +`pacman -R c64uv` removes it. To build the package yourself instead (e.g. on +aarch64), run `makepkg -si` in `packaging/aur`. ## Limitations diff --git a/packaging/aur/PKGBUILD b/packaging/aur/PKGBUILD index b3f62da..d615f70 100644 --- a/packaging/aur/PKGBUILD +++ b/packaging/aur/PKGBUILD @@ -7,6 +7,7 @@ arch=('x86_64' 'aarch64') url="https://github.com/crustovsky/C64UV" license=('MIT') depends=('sdl3' 'curl' 'iputils' 'hicolor-icon-theme') +options=('!debug') source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") sha256sums=('3cb199684ff592404066105561e16236f8995d20d49c96dde73ef97edcf5d214') From f675160af86380a732581c356d9dc7e74f5636c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 14:56:44 +0000 Subject: [PATCH 3/4] Release: attach a pacman package to an existing tag on demand workflow_dispatch takes an optional tag input that only runs the Arch job against that tag and uploads the package to its release. README points pacman -U at the v0.2.8 package. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MD4jNoeKcKQc8pkZyJTepc --- .github/workflows/release.yml | 21 ++++++++++++++------- CLAUDE.md | 3 ++- README.md | 11 ++++++----- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b8c721..741f7ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,12 +4,17 @@ on: push: tags: ["v*"] workflow_dispatch: + inputs: + tag: + description: "Existing tag: only build its pacman package and attach it to that release" + required: false permissions: contents: write jobs: linux-static: + if: ${{ !inputs.tag }} # oldest supported LTS runner = broadest glibc compatibility runs-on: ubuntu-22.04 steps: @@ -93,19 +98,21 @@ jobs: arch-package: runs-on: ubuntu-latest container: archlinux:latest + env: + TAG: ${{ inputs.tag || (startsWith(github.ref, 'refs/tags/') && github.ref_name || '') }} steps: - name: Install build dependencies run: pacman -Syu --noconfirm base-devel github-cli sdl3 curl iputils hicolor-icon-theme - uses: actions/checkout@v4 - # On a tag, build that tag: the in-tree PKGBUILD still points at the + # Build the tag itself: the in-tree PKGBUILD still points at the # previous release until it is bumped afterwards. - name: Point PKGBUILD at the tag - if: startsWith(github.ref, 'refs/tags/') + if: env.TAG != '' working-directory: packaging/aur run: | - sed -i "s/^pkgver=.*/pkgver=${GITHUB_REF_NAME#v}/; s/^pkgrel=.*/pkgrel=1/" PKGBUILD + sed -i "s/^pkgver=.*/pkgver=${TAG#v}/; s/^pkgrel=.*/pkgrel=1/" PKGBUILD sed -i "s/^sha256sums=.*/sha256sums=('SKIP')/" PKGBUILD - name: Build package @@ -116,17 +123,17 @@ jobs: su builder -c "makepkg --noconfirm" - name: Upload to release - if: startsWith(github.ref, 'refs/tags/') + if: env.TAG != '' working-directory: packaging/aur env: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} run: | - gh release create "$GITHUB_REF_NAME" --generate-notes || true - gh release upload "$GITHUB_REF_NAME" c64uv-*.pkg.tar.zst --clobber + gh release create "$TAG" --generate-notes || true + gh release upload "$TAG" c64uv-*.pkg.tar.zst --clobber - name: Upload artifact (non-tag runs) - if: "!startsWith(github.ref, 'refs/tags/')" + if: env.TAG == '' uses: actions/upload-artifact@v4 with: name: c64uv-arch-package diff --git a/CLAUDE.md b/CLAUDE.md index 7c426a1..cb12624 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -35,7 +35,8 @@ Packaging: `make install` (DESTDIR/PREFIX) installs the binary plus reference tags that already contain the packaging files; bump `pkgver` and `sha256sums` on release (the release workflow builds the .pkg.tar.zst from the pushed tag itself, overriding pkgver, so a stale PKGBUILD never blocks -it). `SDL_SetAppMetadata` identifier and the desktop +it; a manual run with the `tag` input does the same for an existing +release), plus the version in README's `pacman -U` URL. `SDL_SetAppMetadata` identifier and the desktop file basename must both stay `c64uv` or desktops lose the window icon. ``` diff --git a/README.md b/README.md index d7e8f0e..4ffad4e 100644 --- a/README.md +++ b/README.md @@ -159,15 +159,16 @@ binary, a desktop entry, and the icon. Prebuilt static binaries are on the in your environment if you launch it from the desktop menu rather than a terminal. -On Arch, each release also ships a pacman package. Download -`c64uv--1-x86_64.pkg.tar.zst` from the releases page and install it: +On Arch (x86_64), install the pacman package from the latest release: ```sh -sudo pacman -U c64uv-*-x86_64.pkg.tar.zst +sudo pacman -U https://github.com/crustovsky/C64UV/releases/download/v0.2.8/c64uv-0.2.8-1-x86_64.pkg.tar.zst ``` -`pacman -R c64uv` removes it. To build the package yourself instead (e.g. on -aarch64), run `makepkg -si` in `packaging/aur`. +For newer releases, take the `.pkg.tar.zst` link from the +[releases page](https://github.com/crustovsky/C64UV/releases). `pacman -R +c64uv` removes it. To build the package yourself instead (e.g. on aarch64), +run `makepkg -si` in `packaging/aur`. ## Limitations From 1dbde2aacf83e4fbe04abbcb37a7c91fe6e61987 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 15:07:44 +0000 Subject: [PATCH 4/4] README: version-free pacman install instructions Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MD4jNoeKcKQc8pkZyJTepc --- CLAUDE.md | 2 +- README.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index cb12624..eab130d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -36,7 +36,7 @@ reference tags that already contain the packaging files; bump `pkgver` and `sha256sums` on release (the release workflow builds the .pkg.tar.zst from the pushed tag itself, overriding pkgver, so a stale PKGBUILD never blocks it; a manual run with the `tag` input does the same for an existing -release), plus the version in README's `pacman -U` URL. `SDL_SetAppMetadata` identifier and the desktop +release). `SDL_SetAppMetadata` identifier and the desktop file basename must both stay `c64uv` or desktops lose the window icon. ``` diff --git a/README.md b/README.md index 4ffad4e..be301e2 100644 --- a/README.md +++ b/README.md @@ -159,16 +159,16 @@ binary, a desktop entry, and the icon. Prebuilt static binaries are on the in your environment if you launch it from the desktop menu rather than a terminal. -On Arch (x86_64), install the pacman package from the latest release: +On Arch (x86_64), download `c64uv--1-x86_64.pkg.tar.zst` from the +[latest release](https://github.com/crustovsky/C64UV/releases/latest) and +install it with pacman: ```sh -sudo pacman -U https://github.com/crustovsky/C64UV/releases/download/v0.2.8/c64uv-0.2.8-1-x86_64.pkg.tar.zst +sudo pacman -U c64uv-*-x86_64.pkg.tar.zst ``` -For newer releases, take the `.pkg.tar.zst` link from the -[releases page](https://github.com/crustovsky/C64UV/releases). `pacman -R -c64uv` removes it. To build the package yourself instead (e.g. on aarch64), -run `makepkg -si` in `packaging/aur`. +`pacman -R c64uv` removes it. To build the package yourself instead (e.g. on +aarch64), run `makepkg -si` in `packaging/aur`. ## Limitations