# Maintainer: nippy pkgname=raveswitch pkgver=0.5.2 pkgrel=1 pkgdesc="A modern GTK4-based window switcher and application launcher for Hyprland" arch=('x86_64' 'aarch64') conflicts=('hyprshell') provides=('hyprshell') url="https://git.rp1.hu/gabeszm/hyprland_raveswitch" license=('MIT') options=('!debug') makedepends=('cargo' 'git') depends=('hyprland' 'gtk4-layer-shell' 'gtk4' 'libadwaita' 'zstd') backup=('etc/raveswitch/config.toml') source=("hyprland_raveswitch::git+ssh://git@git.rp1.hu/gabeszm/hyprland_raveswitch.git") sha256sums=('SKIP') prepare() { export RUSTUP_TOOLCHAIN=stable cd hyprland_raveswitch cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cd hyprland_raveswitch cargo build --frozen --release } package() { cd hyprland_raveswitch install -Dm755 target/release/raveswitch "$pkgdir/usr/bin/raveswitch" install -Dm755 target/release/raveswitch-socat "$pkgdir/usr/bin/raveswitch-socat" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 README.md "$pkgdir/usr/share/doc/raveswitch/README.md" install -Dm644 docs/CONFIGURE.md "$pkgdir/usr/share/doc/raveswitch/CONFIGURE.md" install -Dm644 packaging/raveswitch.service "$pkgdir/usr/lib/systemd/user/raveswitch.service" install -Dm644 packaging/hu.rp1.raveswitch.settings.desktop "$pkgdir/usr/share/applications/hu.rp1.raveswitch.settings.desktop" # the desktop file uses raveswitch-settings, docks derive the others from the app id local name size for name in raveswitch raveswitch-settings hu.rp1.raveswitch.settings; do install -Dm644 assets/icons/256x256/raveswitch.png "$pkgdir/usr/share/pixmaps/$name.png" for size in 16 24 32 48 64 128 256 512; do install -Dm644 "assets/icons/${size}x${size}/raveswitch.png" \ "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/$name.png" done done install -dm755 "$pkgdir/usr/share/raveswitch" tar --no-same-owner -xf packaging/usr-share.tar -C "$pkgdir/usr/share/raveswitch" install -Dm644 assets/switch_logo.png "$pkgdir/usr/share/raveswitch/assets/switch_logo.png" install -Dm644 src/default_styles.css "$pkgdir/usr/share/raveswitch/default_styles.css" install -Dm644 config/config.toml "$pkgdir/etc/raveswitch/config.toml" "$pkgdir/usr/bin/raveswitch" completions bash -p "$pkgdir/usr/share/bash-completion/completions" "$pkgdir/usr/bin/raveswitch" completions fish -p "$pkgdir/usr/share/fish/vendor_completions.d" "$pkgdir/usr/bin/raveswitch" completions zsh -p "$pkgdir/usr/share/zsh/site-functions" }