Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -89,3 +94,47 @@ jobs:
with:
name: c64uv-linux-x86_64
path: c64uv-*-linux-x86_64.tar.gz

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

# 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: env.TAG != ''
working-directory: packaging/aur
run: |
sed -i "s/^pkgver=.*/pkgver=${TAG#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: env.TAG != ''
working-directory: packaging/aur
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release create "$TAG" --generate-notes || true
gh release upload "$TAG" c64uv-*.pkg.tar.zst --clobber

- name: Upload artifact (non-tag runs)
if: env.TAG == ''
uses: actions/upload-artifact@v4
with:
name: c64uv-arch-package
path: packaging/aur/c64uv-*.pkg.tar.zst
5 changes: 4 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ 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; a manual run with the `tag` input does the same for an existing
release). `SDL_SetAppMetadata` identifier and the desktop
file basename must both stay `c64uv` or desktops lose the window icon.

```
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,22 @@ 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 (x86_64), download `c64uv-<version>-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 c64uv-*-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`.

## Limitations

- On current official firmware, typed input goes through the KERNAL keyboard
Expand Down
1 change: 1 addition & 0 deletions packaging/aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Loading