From f4a4dd37c9b343be40d54961528cf73ce90d02b3 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Tue, 26 May 2026 04:43:27 -0400 Subject: [PATCH] feat(packaging): add Arch PKGBUILD (local versioned build) Builds pixelpass 0.1.0 with --features gui from the local repo and installs the binary, .desktop launcher, scalable icon, and README. Runtime deps mapped from src/common/deps.rs (GStreamer pipeline + pactl); viewers and alternate encoders are optdepends. Co-Authored-By: Claude Opus 4.7 --- packaging/arch/PKGBUILD | 62 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 packaging/arch/PKGBUILD diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD new file mode 100644 index 0000000..295cd15 --- /dev/null +++ b/packaging/arch/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: mollusk +# +# Local versioned package. Builds from the local git repo; for the first +# package we track the `feat/packaging` branch. Once this is merged, point +# `_branch` at `main` (or switch to a `#tag=v0.1.0` fragment for a release). + +pkgname=pixelpass +pkgver=0.1.0 +pkgrel=1 +pkgdesc='P2P screen sharing over iroh — no port forwarding, no signup' +arch=('x86_64') +url='file:///home/mollusk/git/butter/pixelpass' +license=('MIT' 'Apache-2.0') +depends=( + 'gstreamer' # gst-launch-1.0 / gst-inspect-1.0 + 'gst-plugins-base' # videoscale (quality-preset downscale) + 'gst-plugins-good' # ximagesrc (X11 capture) + pulsesrc + 'gst-plugins-bad' # h264parse, mpegtsmux, aacparse + 'gst-libav' # avenc_aac (audio encode) + 'gst-plugin-va' # vah264enc (default hardware H.264 encoder) + 'libpulse' # pactl (audio routing / device control) + 'hicolor-icon-theme' # owns the scalable icon dir + 'libglvnd' # libGL for the egui (glow) GUI + 'libxkbcommon' # GUI keyboard handling (winit) + 'wayland' # GUI Wayland backend libs +) +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`)' +) +makedepends=('cargo' 'git') +options=('!lto') +_branch='feat/packaging' +source=("$pkgname::git+file:///home/mollusk/git/butter/pixelpass#branch=$_branch") +sha256sums=('SKIP') + +prepare() { + cd "$srcdir/$pkgname" + export RUSTUP_TOOLCHAIN=stable + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd "$srcdir/$pkgname" + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + # --features gui so the .desktop launcher (pixelpass --gui) works. + cargo build --frozen --release --features gui +} + +package() { + cd "$srcdir/$pkgname" + install -Dm0755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname" + install -Dm0644 assets/pixelpass.desktop \ + "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm0644 assets/pixelpass.svg \ + "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg" + install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" +}