From 7ff7766ede3414f569ed51b5d59ade719f8d1c8a Mon Sep 17 00:00:00 2001 From: Mollusk Date: Fri, 19 Jun 2026 22:56:51 -0400 Subject: [PATCH] packaging: add test-pack split PKGBUILD (peerspeak + pixelpass) One `makepkg -si` from packaging/test-pack/ builds and installs both peerspeak and pixelpass from the public gitbutter repos over https, so a tester can clone the repo and get a working voice+screenshare pair in one command. pixelpass installs to /usr/bin so peerspeak's screen-share button finds it. Co-Authored-By: Claude Opus 4.8 --- packaging/test-pack/PKGBUILD | 112 ++++++++++++++++++++++++++++++++++ packaging/test-pack/README.md | 52 ++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 packaging/test-pack/PKGBUILD create mode 100644 packaging/test-pack/README.md diff --git a/packaging/test-pack/PKGBUILD b/packaging/test-pack/PKGBUILD new file mode 100644 index 0000000..7aec110 --- /dev/null +++ b/packaging/test-pack/PKGBUILD @@ -0,0 +1,112 @@ +# Maintainer: mollusk +# +# Test-pack split package: ONE `makepkg -si` builds + installs BOTH peerspeak +# (voice chat) and pixelpass (screen sharing) from the public gitbutter repos +# over https. pixelpass lands on /usr/bin so peerspeak's screen-share button +# finds it. Shared version string is derived from peerspeak's git. +# +# Clone this repo and build from here: +# git clone https://gitbutter.xyz/mollusk/peerspeak.git +# cd peerspeak/packaging/test-pack +# makepkg -si +pkgbase=peerspeak-git +pkgname=('peerspeak-git' 'pixelpass') +pkgver=0.1.0 +pkgrel=1 +arch=('x86_64') +url="https://gitbutter.xyz/mollusk/peerspeak" +license=('custom' 'MIT' 'Apache-2.0' 'OFL-1.1') +makedepends=('git' 'cargo' 'pkgconf') +options=('!lto' '!debug') +source=("peerspeak::git+https://gitbutter.xyz/mollusk/peerspeak.git" + "pixelpass::git+https://gitbutter.xyz/mollusk/pixelpass.git#branch=main") +sha256sums=('SKIP' + 'SKIP') + +pkgver() { + cd "$srcdir/peerspeak" + # Shared across both split packages. 0.1.0.r.g. + printf '%s.r%s.g%s' \ + "$(awk -F'\"' '/^version =/{print $2; exit}' Cargo.toml)" \ + "$(git rev-list --count HEAD)" \ + "$(git rev-parse --short HEAD)" +} + +prepare() { + # Vendor deps up front so build() can run --frozen (no surprise network). + export CARGO_HOME="$srcdir/cargo-home" + local host; host="$(rustc -vV | sed -n 's/host: //p')" + cd "$srcdir/peerspeak"; cargo fetch --locked --target "$host" + cd "$srcdir/pixelpass"; cargo fetch --locked --target "$host" +} + +build() { + export CARGO_HOME="$srcdir/cargo-home" + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + + cd "$srcdir/peerspeak" + cargo build --frozen --release --bin peerspeak + + cd "$srcdir/pixelpass" + # --features gui so the .desktop launcher (pixelpass --gui) works. + cargo build --frozen --release --features gui +} + +check() { + export CARGO_HOME="$srcdir/cargo-home" + export RUSTUP_TOOLCHAIN=stable + # peerspeak library unit tests only — its integration suites bind real + # iroh/QUIC endpoints and fail in a sandboxed/offline build environment. + cd "$srcdir/peerspeak" + cargo test --frozen --release --lib +} + +package_peerspeak-git() { + pkgdesc="Decentralized peer-to-peer voice chat (Rust/iroh/PipeWire/Opus/iced)" + depends=('pipewire' 'opus') + optdepends=('pixelpass: screen sharing inside a room' + 'mpv: screen-share viewer (vlc is used as a fallback)') + provides=('peerspeak') + conflicts=('peerspeak') + license=('custom') + + cd "$srcdir/peerspeak" + install -Dm755 "target/release/peerspeak" "$pkgdir/usr/bin/peerspeak" + install -Dm644 "packaging/peerspeak.desktop" \ + "$pkgdir/usr/share/applications/peerspeak.desktop" + + # Hicolor icon theme (scalable SVG + the rendered raster sizes). + install -Dm644 "assets/icons/peerspeak.svg" \ + "$pkgdir/usr/share/icons/hicolor/scalable/apps/peerspeak.svg" + local s + for s in 16 24 32 48 64 128 256 512; do + install -Dm644 "assets/icons/peerspeak-$s.png" \ + "$pkgdir/usr/share/icons/hicolor/${s}x${s}/apps/peerspeak.png" + done +} + +package_pixelpass() { + pkgdesc='P2P screen sharing over iroh — no port forwarding, no signup' + depends=('gstreamer' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' + 'gst-libav' 'gst-plugin-va' 'libpulse' 'hicolor-icon-theme' + 'libglvnd' 'libxkbcommon' 'wayland') + optdepends=('mpv: recommended stream viewer (the GUI launches mpv)' + 'vlc: alternative stream viewer' + 'gst-plugins-ugly: software x264 encoding for `pixelpass --no-hwencode`' + 'gst-plugin-pipewire: screen capture on Wayland sessions' + 'xorg-xwininfo: share a single window on X11 (`pixelpass --window`)') + license=('MIT' 'Apache-2.0' 'OFL-1.1') + + cd "$srcdir/pixelpass" + install -Dm0755 "target/release/pixelpass" "$pkgdir/usr/bin/pixelpass" + install -Dm0644 assets/pixelpass.desktop \ + "$pkgdir/usr/share/applications/pixelpass.desktop" + install -Dm0644 assets/pixelpass.svg \ + "$pkgdir/usr/share/icons/hicolor/scalable/apps/pixelpass.svg" + install -Dm0644 README.md "$pkgdir/usr/share/doc/pixelpass/README.md" + install -Dm0644 LICENSE-MIT "$pkgdir/usr/share/licenses/pixelpass/LICENSE-MIT" + install -Dm0644 LICENSE-APACHE "$pkgdir/usr/share/licenses/pixelpass/LICENSE-APACHE" + install -Dm0644 assets/NotoSans-OFL.txt \ + "$pkgdir/usr/share/licenses/pixelpass/NotoSans-OFL.txt" +} diff --git a/packaging/test-pack/README.md b/packaging/test-pack/README.md new file mode 100644 index 0000000..7425566 --- /dev/null +++ b/packaging/test-pack/README.md @@ -0,0 +1,52 @@ +# PeerSpeak + PixelPass — CachyOS/Arch test pack + +A single **split PKGBUILD** that builds the latest code from the public gitbutter +repos and installs **both** programs at once: + +- `peerspeak` — decentralized P2P voice chat +- `pixelpass` — P2P screen sharing (peerspeak launches it for the screen-share button) + +## Build & install (one command) + +```sh +git clone https://gitbutter.xyz/mollusk/peerspeak.git +cd peerspeak/packaging/test-pack +makepkg -si +``` + +`makepkg -si` auto-installs every dependency via pacman before building — +including the Rust toolchain itself (the `cargo` makedepend is provided by the +`rust` package), `git`, `pkgconf`, pipewire + opus for peerspeak, and the +gstreamer/VA-API stack for pixelpass. The only prerequisite is the `base-devel` +group (which provides `makepkg`). If you already use `rustup`, that satisfies the +`cargo` makedepend and the `rust` package won't be pulled in — no conflict. + +When it finishes you'll have `peerspeak` and `pixelpass` on your PATH at +`/usr/bin`. To rebuild later with fresh upstream code, re-run `makepkg -si`; the +git sources re-pull `main` and the version bumps automatically. + +> Skip the test step with `makepkg -si --nocheck` for a faster build. + +## Running the cross-internet test + +1. Launch `peerspeak` on both machines. +2. One person **creates** a room and shares the room code/ticket with the other. +3. The other **joins** with that code. +4. iroh does NAT hole-punching automatically; if a direct path can't be made it + falls back to a public n0 relay — **no port forwarding required**. +5. Allow the app through any local firewall if prompted (outbound UDP / QUIC; + nothing needs to be opened inbound for relay mode). + +### What we're smoke-testing +- Two real humans, two networks, over the internet. +- Mic capture + remote playback both directions, no crackle/dropouts. +- Mute / deafen, push-to-talk. +- Text chat in-room. +- Avatars (presets + custom upload) show up on the other side. +- Screen share: click the screen-share control → it launches `pixelpass`; the + viewer opens in `mpv` on the receiving side. +- Notification chimes (join/leave/etc.). +- Leave / rejoin cleanly. + +If anything misbehaves, grab the log path peerspeak prints on startup and the +exact repro steps.