Files
umutray/packaging/PKGBUILD
T
funman300 2f4f1c64d2 refactor: idiomatic Rust cleanup and quality improvements
- Replace .map().unwrap_or(false) with .is_some_and()/.is_ok_and()
- Use path.display() instead of {:?} for user-facing messages
- Replace Option<Option<Vec<String>>> with GamescopeUpdate enum
- Replace manual parent-walking loops with .ancestors() iterators
- Simplify kill()/kill_all() signatures to return () instead of Result
- Use tokio::task::spawn_blocking instead of hand-rolled thread+oneshot
- Read /proc/self/status for UID instead of spawning id subprocess
- Build Exec= line directly in render_desktop instead of string-replace
- Bump PKGBUILD pkgrel to 6
2026-04-19 11:29:42 -07:00

60 lines
1.7 KiB
Bash

# Maintainer: funman300 <funman300@gmail.com>
#
# AUR NOTE: This PKGBUILD is kept in the source repo for convenience during
# development. For AUR submission, move it to a separate repository and update
# the `source` array to point to the upstream git URL instead of a local path.
#
# To build locally:
# cd packaging && makepkg -si
#
# To update for AUR, replace the source line with:
# source=("$pkgname::git+https://git.aleshym.co/funman300/umutray.git#tag=v$pkgver")
pkgname=umutray
pkgver=0.1.0
pkgrel=6
pkgdesc='Tray-based Wine launcher manager for Linux via umu/Proton-GE'
arch=('x86_64')
url='https://git.aleshym.co/funman300/umutray'
license=('MIT')
depends=('umu-launcher')
makedepends=('rust' 'cargo')
optdepends=(
'zenity: folder picker in setup wizard (GNOME/GTK)'
'kdialog: folder picker in setup wizard (KDE)'
'gamemode: per-game GameMode support'
'mangohud: per-game MangoHud overlay'
'gamescope: per-game Gamescope compositor'
)
# Build from the local repository. Change to the upstream URL for AUR.
_localrepo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
source=("$pkgname::git+file://${_localrepo}")
sha256sums=('SKIP')
prepare() {
cd "$pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$pkgname"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --release --locked --offline
}
package() {
cd "$pkgname"
# Binary
install -Dm755 target/release/umutray "$pkgdir/usr/bin/umutray"
# App menu entry
install -Dm644 umutray.desktop "$pkgdir/usr/share/applications/umutray.desktop"
# License
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}