feat: app icon + Arch package (PKGBUILD + .desktop)
Add a desktop/taskbar identity and a system package for PeerSpeak. - assets/icons/peerspeak.svg: master app icon — the in-app mic glyph over a P2P mesh of peer nodes, Catppuccin Mocha palette. Rendered to the hicolor raster sizes (16..512) committed alongside it. - Window/taskbar icon: embed a 128x128 straight-RGBA blob and load it via iced from_rgba (keeps us off iced's heavy `image` feature). Set the Wayland/X11 app_id to "peerspeak" so compositors match the window to the .desktop launcher and show the icon natively. - packaging/peerspeak.desktop: launcher (StartupWMClass=peerspeak). - packaging/PKGBUILD: peerspeak-git VCS package — cargo --frozen build, --lib check, installs the binary, .desktop, and hicolor icons. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
# Maintainer: mollusk <jitty+lc1iz0dc@protonmail.com>
|
||||
pkgname=peerspeak-git
|
||||
_pkgname=peerspeak
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Decentralized peer-to-peer voice chat (Rust/iroh/PipeWire/Opus/iced)"
|
||||
arch=('x86_64')
|
||||
url="https://gitbutter.xyz/mollusk/peerspeak"
|
||||
license=('custom')
|
||||
depends=('pipewire' 'opus')
|
||||
makedepends=('git' 'cargo' 'pkgconf')
|
||||
optdepends=('pixelpass: screen sharing inside a room'
|
||||
'mpv: screen-share viewer (vlc is used as a fallback)')
|
||||
provides=('peerspeak')
|
||||
conflicts=('peerspeak')
|
||||
options=('!lto' '!debug')
|
||||
source=("$_pkgname::git+ssh://git@gitbutter.xyz/mollusk/peerspeak.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/$_pkgname"
|
||||
# 0.1.0.r<commits>.g<short-sha> — sorts monotonically across rebuilds.
|
||||
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() {
|
||||
cd "$srcdir/$_pkgname"
|
||||
# Vendor deps up front so build() can run --frozen (no surprise network).
|
||||
export CARGO_HOME="$srcdir/cargo-home"
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$_pkgname"
|
||||
export CARGO_HOME="$srcdir/cargo-home"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release --bin "$_pkgname"
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$srcdir/$_pkgname"
|
||||
export CARGO_HOME="$srcdir/cargo-home"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
# Library unit tests only — the integration suites bind real iroh/QUIC
|
||||
# endpoints and fail in a sandboxed/offline build environment.
|
||||
cargo test --frozen --release --lib
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$_pkgname"
|
||||
|
||||
install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
|
||||
install -Dm644 "packaging/$_pkgname.desktop" \
|
||||
"$pkgdir/usr/share/applications/$_pkgname.desktop"
|
||||
|
||||
# Hicolor icon theme (scalable SVG + the rendered raster sizes).
|
||||
install -Dm644 "assets/icons/$_pkgname.svg" \
|
||||
"$pkgdir/usr/share/icons/hicolor/scalable/apps/$_pkgname.svg"
|
||||
local s
|
||||
for s in 16 24 32 48 64 128 256 512; do
|
||||
install -Dm644 "assets/icons/$_pkgname-$s.png" \
|
||||
"$pkgdir/usr/share/icons/hicolor/${s}x${s}/apps/$_pkgname.png"
|
||||
done
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=PeerSpeak
|
||||
GenericName=P2P Voice Chat
|
||||
Comment=Decentralized peer-to-peer voice chat
|
||||
Exec=peerspeak
|
||||
Icon=peerspeak
|
||||
Terminal=false
|
||||
Categories=Network;Telephony;Chat;
|
||||
Keywords=voice;chat;voip;p2p;peer;
|
||||
StartupWMClass=peerspeak
|
||||
Reference in New Issue
Block a user