From 72221d470e051d17398c2aefa9e0558fc8fcc757 Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 12 Jun 2026 18:31:08 +0200 Subject: [PATCH] aur: split into tutabridge-git and tutabridge-bin packages Add a prebuilt tutabridge-bin package (downloads the published x86_64 CLI binary, no Rust build) alongside the build-from-source tutabridge-git, each in its own directory with a PKGBUILD and .SRCINFO. Update the maintainer address and the packaging README for the two-package layout. --- packaging/aur/README.md | 60 +++++++++++++-------- packaging/aur/tutabridge-bin/PKGBUILD | 31 +++++++++++ packaging/aur/tutabridge-git/.SRCINFO | 25 +++++++++ packaging/aur/{ => tutabridge-git}/PKGBUILD | 3 +- 4 files changed, 95 insertions(+), 24 deletions(-) create mode 100644 packaging/aur/tutabridge-bin/PKGBUILD create mode 100644 packaging/aur/tutabridge-git/.SRCINFO rename packaging/aur/{ => tutabridge-git}/PKGBUILD (94%) diff --git a/packaging/aur/README.md b/packaging/aur/README.md index c845ab0..5f8776b 100644 --- a/packaging/aur/README.md +++ b/packaging/aur/README.md @@ -1,15 +1,22 @@ # AUR packaging -`PKGBUILD` for the **headless TutaBridge daemon** (CLI only — no GUI). It builds -just the `tutabridge` binary, so it pulls no Node / Tauri / webkit dependencies. +Two packages for the **headless TutaBridge daemon** (CLI only, no GUI, so no +Node / Tauri / webkit dependencies): -## Local build / test +| Directory | AUR package | What it does | +|-----------|-------------|--------------| +| `tutabridge-git/` | `tutabridge-git` | Builds the `tutabridge` binary from the latest commit (needs the Rust toolchain). | +| `tutabridge-bin/` | `tutabridge-bin` | Downloads the prebuilt x86_64 binary from the GitHub release. No build. | -On an Arch machine: +Each directory holds a `PKGBUILD` and a `.SRCINFO`. They install +`/usr/bin/tutabridge` plus a user systemd unit. + +## Local build / test (on Arch) ```bash -cd packaging/aur +cd packaging/aur/tutabridge-bin # or tutabridge-git makepkg -si # build + install +namcap PKGBUILD # lint ``` ## First run @@ -22,34 +29,41 @@ tutabridge # prompts for email, then Tuta pass systemctl --user enable --now tutabridge # run it in the background from now on ``` -Connect your mail client to `127.0.0.1:1143` (IMAP) / `127.0.0.1:1025` (SMTP), -using the bridge password printed in the logs (`journalctl --user -u tutabridge`). +Connect your mail client to `127.0.0.1:1143` (IMAP) and `127.0.0.1:1025` +(SMTP), using the bridge password printed in the logs +(`journalctl --user -u tutabridge`). ## Publishing to the AUR -This directory is the package *source*, not the AUR git repo. To publish: +Each AUR package is its own git repo. From an Arch host (so `makepkg` is +available to verify the `.SRCINFO`): ```bash -git clone ssh://aur@aur.archlinux.org/tutabridge-git.git -cp packaging/aur/PKGBUILD tutabridge-git/ -cd tutabridge-git -makepkg --printsrcinfo > .SRCINFO # must be generated on Arch +git clone ssh://aur@aur.archlinux.org/tutabridge-bin.git +cp packaging/aur/tutabridge-bin/PKGBUILD tutabridge-bin/ +cd tutabridge-bin +makepkg --printsrcinfo > .SRCINFO # regenerate to be safe, then diff against the committed one git add PKGBUILD .SRCINFO git commit -m "Initial import" && git push ``` -`.SRCINFO` is intentionally not committed here — it has to be generated by -`makepkg` on an Arch host so it matches the PKGBUILD exactly. +Same flow for `tutabridge-git`. The `.SRCINFO` files here are committed for +convenience, but regenerate them with `makepkg --printsrcinfo` on Arch before +pushing so they match the PKGBUILD exactly. + +## Updating on a new release + +- `tutabridge-git` updates itself: `pkgver()` derives `0.r.` + from git, so a rebuild always tracks the latest commit. Only re-push if the + PKGBUILD itself changes. +- `tutabridge-bin` pins a release: bump `pkgver` and `_tag`, refresh the three + `sha256sums` (`updpkgsums`), regenerate `.SRCINFO`, and push. ## Notes -- `pkgver()` derives `0.r.` from git; `makepkg` rewrites the - `pkgver=` line on each build. -- The keyring Secret Service backend links system `libdbus` (via - `libdbus-sys`), so `dbus` is a build + runtime dependency. It's present on - essentially every Linux desktop already. +- The keyring Secret Service backend links system `libdbus` (via `libdbus-sys`), + so `dbus` is a build + runtime dependency. It is present on essentially every + Linux desktop already. - Keyring *persistence* additionally needs a running Secret Service provider - (gnome-keyring / kwallet) — listed as optdepends. Without one the daemon - still works but will ask for the Tuta password on every start. -- A future tagged release can add a non-`-git` `tutabridge` package built from - a release tarball. + (gnome-keyring / kwallet), listed as optdepends. Without one the daemon still + works but asks for the Tuta password on every start. diff --git a/packaging/aur/tutabridge-bin/PKGBUILD b/packaging/aur/tutabridge-bin/PKGBUILD new file mode 100644 index 0000000..1d3b034 --- /dev/null +++ b/packaging/aur/tutabridge-bin/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: spartanz51 +# +# Prebuilt headless TutaBridge CLI/daemon: downloads the published x86_64 +# binary from the GitHub release, no Rust build. The GUI is not packaged here. +# For a build-from-source VCS package, see tutabridge-git. + +pkgname=tutabridge-bin +pkgver=0.1.0rc1 +pkgrel=1 +pkgdesc="Local IMAP/SMTP bridge for Tuta encrypted email (prebuilt headless CLI/daemon)" +arch=('x86_64') +url="https://github.com/spartanz51/tutabridge" +license=('GPL-3.0-or-later') +depends=('gcc-libs' 'dbus') +optdepends=('gnome-keyring: persist the Tuta session across reboots (Secret Service)' + 'kwallet: alternative Secret Service provider') +provides=('tutabridge') +conflicts=('tutabridge') +_tag=v0.1.0-rc.1 +source=("tutabridge-$pkgver::$url/releases/download/$_tag/tutabridge-linux-x86_64" + "tutabridge.service::https://raw.githubusercontent.com/spartanz51/tutabridge/$_tag/packaging/systemd/tutabridge.service" + "LICENSE::https://raw.githubusercontent.com/spartanz51/tutabridge/$_tag/LICENSE") +sha256sums=('e4589807752da816ef3b84cf1d13e9793eca3621d0da9805ca96d3c3151d52cd' + '9c398acf860036a8912a3f0686cfd6dc55cb714fc3ddbff68c21755777cd439f' + '947215ddc328843b76022d5b77e1ca3b1152301778d33e24491e5064e92fc6cf') + +package() { + install -Dm755 "tutabridge-$pkgver" "$pkgdir/usr/bin/tutabridge" + install -Dm644 "tutabridge.service" "$pkgdir/usr/lib/systemd/user/tutabridge.service" + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/packaging/aur/tutabridge-git/.SRCINFO b/packaging/aur/tutabridge-git/.SRCINFO new file mode 100644 index 0000000..39cd575 --- /dev/null +++ b/packaging/aur/tutabridge-git/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = tutabridge-git + pkgdesc = Local IMAP/SMTP bridge for Tuta encrypted email (headless CLI/daemon) + pkgver = 0.r0.0000000 + pkgrel = 1 + url = https://github.com/spartanz51/tutabridge + arch = x86_64 + arch = aarch64 + license = GPL-3.0-or-later + makedepends = rust + makedepends = cargo + makedepends = git + makedepends = cmake + makedepends = nasm + makedepends = dbus + makedepends = pkgconf + depends = gcc-libs + depends = dbus + optdepends = gnome-keyring: persist the Tuta session across reboots (Secret Service) + optdepends = kwallet: alternative Secret Service provider + provides = tutabridge + conflicts = tutabridge + source = tutabridge-git::git+https://github.com/spartanz51/tutabridge.git + sha256sums = SKIP + +pkgname = tutabridge-git diff --git a/packaging/aur/PKGBUILD b/packaging/aur/tutabridge-git/PKGBUILD similarity index 94% rename from packaging/aur/PKGBUILD rename to packaging/aur/tutabridge-git/PKGBUILD index 699819d..bf6bcd3 100644 --- a/packaging/aur/PKGBUILD +++ b/packaging/aur/tutabridge-git/PKGBUILD @@ -2,7 +2,8 @@ # # VCS package — builds the headless TutaBridge CLI/daemon from the latest # commit. The GUI (Tauri) is intentionally not built here; this package is -# the lean daemon for terminal / server use. +# the lean daemon for terminal / server use. For a prebuilt binary with no +# Rust build, see tutabridge-bin. pkgname=tutabridge-git pkgver=0.r0.0000000