aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-28 16:54:56 +0200
committeruser <user@clank>2026-08-28 16:54:56 +0200
commit6f4f6746963400a21942e02ed80f2107b28d4527 (patch)
tree08f8904896088ba8c8df296e7f8e711bde7037cf
parentrelease: one command to bump, commit and tag (diff)
downloadslosh-6f4f6746963400a21942e02ed80f2107b28d4527.tar.gz
slosh-6f4f6746963400a21942e02ed80f2107b28d4527.tar.xz
slosh-6f4f6746963400a21942e02ed80f2107b28d4527.zip
aur: a PKGBUILD, building offline from the cgit snapshot
contrib/aur/ is the upstream copy of the AUR package; the AUR repo gets these files verbatim on a release, and contrib/release now says so in its checklist. The source is the cgit snapshot of the tag, which carries the vendored libghostty-vt -- and every zig dependency in its build.zig.zon is lazy and unused by the VT-only build (verified against a cold ZIG_GLOBAL_CACHE_DIR), so the build fetches nothing and is clean in an offline chroot. prepare() writes pkgver into VERSION because the v0.1.1 snapshot predates the release script that keeps the floor bumped; for later tags the line writes what is already there.
-rw-r--r--contrib/aur/.SRCINFO14
-rw-r--r--contrib/aur/PKGBUILD54
-rw-r--r--contrib/aur/README.md47
-rwxr-xr-xcontrib/release1
4 files changed, 116 insertions, 0 deletions
diff --git a/contrib/aur/.SRCINFO b/contrib/aur/.SRCINFO
new file mode 100644
index 0000000..69f060c
--- /dev/null
+++ b/contrib/aur/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = slosh
+ pkgdesc = Terminal multiplexer: panes, tabs, and sessions you can detach from, on libghostty-vt
+ pkgver = 0.1.1
+ pkgrel = 1
+ url = https://slosh.foo
+ arch = x86_64
+ arch = aarch64
+ license = MIT
+ makedepends = zig
+ depends = glibc
+ source = slosh-v0.1.1.tar.gz::https://git.sl0p.foo/slosh.git/snapshot/slosh-v0.1.1.tar.gz
+ sha256sums = c28545524bff2e1582aae34068512439112db8a03c81b587a813492b6912323c
+
+pkgname = slosh
diff --git a/contrib/aur/PKGBUILD b/contrib/aur/PKGBUILD
new file mode 100644
index 0000000..e455ce2
--- /dev/null
+++ b/contrib/aur/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Peter Geissler <peter@haxx.in>
+#
+# The upstream copy of this file lives in contrib/aur/ in the slosh repo;
+# the AUR repo (ssh://aur@aur.archlinux.org/slosh.git) receives it plus a
+# regenerated .SRCINFO on every release -- see contrib/aur/README.md.
+#
+# The build is offline-clean: the terminal core (libghostty-vt) is vendored
+# in the tarball, and its zig dependencies are all lazy and unused by the
+# VT-only build, so `zig build` fetches nothing. Verified against a cold
+# ZIG_GLOBAL_CACHE_DIR.
+
+pkgname=slosh
+pkgver=0.1.1
+pkgrel=1
+pkgdesc="Terminal multiplexer: panes, tabs, and sessions you can detach from, on libghostty-vt"
+arch=('x86_64' 'aarch64')
+url="https://slosh.foo"
+license=('MIT')
+depends=('glibc')
+# zig 0.16 specifically: the vendored core states minimum_zig_version 0.16.0,
+# and a newer zig may well reject it -- zig is not yet stable across versions.
+makedepends=('zig')
+source=("$pkgname-v$pkgver.tar.gz::https://git.sl0p.foo/slosh.git/snapshot/$pkgname-v$pkgver.tar.gz")
+sha256sums=('c28545524bff2e1582aae34068512439112db8a03c81b587a813492b6912323c')
+
+# The Makefile's ZIG default is a developer-machine path; a builder has the
+# real one. Overridable so the package can be test-built where zig lives
+# elsewhere (ZIG=/path/to/zig makepkg).
+_zig="${ZIG:-/usr/bin/zig}"
+
+prepare() {
+ cd "$pkgname-v$pkgver"
+ # A snapshot has no .git, so contrib/version falls back to ./VERSION -- and
+ # in v0.1.1 that file was left at 0.1.0 (fixed since by contrib/release,
+ # which bumps and tags as one step). Harmless for later tags: this writes
+ # the number the file already holds.
+ echo "$pkgver" > VERSION
+}
+
+build() {
+ cd "$pkgname-v$pkgver"
+ # A hermetic zig cache: nothing under $HOME touched, nothing reused from it.
+ export ZIG_GLOBAL_CACHE_DIR="$srcdir/zig-global-cache"
+ make ZIG="$_zig" vendor
+ make ZIG="$_zig" all
+}
+
+package() {
+ cd "$pkgname-v$pkgver"
+ make ZIG="$_zig" DESTDIR="$pkgdir" PREFIX=/usr install
+ # MIT, so the license ships with the package; THIRD-PARTY-LICENSES covers
+ # what is statically linked in (libghostty-vt, stb_image).
+ install -Dm644 LICENSE THIRD-PARTY-LICENSES -t "$pkgdir/usr/share/licenses/$pkgname"
+}
diff --git a/contrib/aur/README.md b/contrib/aur/README.md
new file mode 100644
index 0000000..1eca409
--- /dev/null
+++ b/contrib/aur/README.md
@@ -0,0 +1,47 @@
+# The AUR package
+
+This directory is the upstream copy of the [AUR](https://aur.archlinux.org)
+package: the PKGBUILD, and the `.SRCINFO` generated from it. The AUR itself
+is a separate git repo — `ssh://aur@aur.archlinux.org/slosh.git` — that
+receives these two files; nothing else goes there.
+
+The package builds from the cgit snapshot of a release tag
+(`https://git.sl0p.foo/slosh.git/snapshot/slosh-vX.Y.Z.tar.gz`), which
+carries the vendored libghostty-vt. The build fetches nothing: every zig
+dependency in the vendored core's `build.zig.zon` is lazy and unused by the
+VT-only build, so it is clean under makechrootpkg's offline build. zig 0.16
+comes from `extra/zig`.
+
+## Updating on a release
+
+After `contrib/release X.Y.Z` (which prints this as a reminder):
+
+```sh
+cd contrib/aur
+curl -fsSLO https://git.sl0p.foo/slosh.git/snapshot/slosh-vX.Y.Z.tar.gz
+sha256sum slosh-vX.Y.Z.tar.gz # -> pkgver and sha256sums in PKGBUILD
+rm slosh-vX.Y.Z.tar.gz
+makepkg --printsrcinfo > .SRCINFO
+makepkg -f && rm -rf src pkg *.pkg.tar.zst # build it once, actually
+```
+
+Commit here, then mirror to the AUR repo:
+
+```sh
+git clone ssh://aur@aur.archlinux.org/slosh.git /tmp/aur-slosh
+cp PKGBUILD .SRCINFO /tmp/aur-slosh/
+cd /tmp/aur-slosh && git add -A && git commit -m "X.Y.Z" && git push
+```
+
+Pushing needs an AUR account with an SSH key
+([wiki](https://wiki.archlinux.org/title/AUR_submission_guidelines)); the
+first push creates the package.
+
+## Testing without the system zig
+
+The PKGBUILD resolves zig from `/usr/bin/zig` (what `makedepends` installs),
+but honours `$ZIG` so it can be built where zig lives elsewhere:
+
+```sh
+ZIG=$HOME/zig-0.16.0/zig makepkg -f -d # -d: zig is not pacman-installed
+```
diff --git a/contrib/release b/contrib/release
index 55fb1cf..d0450d4 100755
--- a/contrib/release
+++ b/contrib/release
@@ -77,3 +77,4 @@ fi
echo "release: v$v -- VERSION bumped, committed, tagged. To publish:"
echo " git push origin master v$v"
echo " make release REF=v$v # the tarballs and zips, into dist/"
+echo " contrib/aur/README.md # bump the AUR package (pkgver, sha256, .SRCINFO)"