diff options
Diffstat (limited to 'raveswitch')
| -rw-r--r-- | raveswitch/PKGBUILD | 70 |
1 files changed, 30 insertions, 40 deletions
diff --git a/raveswitch/PKGBUILD b/raveswitch/PKGBUILD index fdff2c7..ee973b7 100644 --- a/raveswitch/PKGBUILD +++ b/raveswitch/PKGBUILD @@ -1,70 +1,60 @@ # Maintainer: nippy <nippy@tuta.io> pkgname=raveswitch -pkgver=0.5.0 +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") +license=('MIT') +options=('!debug') makedepends=('cargo' 'git') -optdepends=('org.freedesktop.secrets: Store clipboard encryption in the keyring') 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 - - mkdir -p dep-crates/hyprland-rs/hyprland-macros - find dep-crates crates -type d 2>/dev/null | while read -r d; do - [ -f "$d/README.md" ] || echo "# vendored module" > "$d/README.md" - done - - mkdir -p assets - if [ ! -f assets/logo.png ]; then - if [ -f assets/raveicon.png ]; then - cp assets/raveicon.png assets/logo.png - else - touch assets/logo.png - fi - fi - - cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" 2>/dev/null || cargo fetch 2>/dev/null || true + 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 || cargo build --release + cargo build --frozen --release } package() { cd hyprland_raveswitch - [ -f "target/release/raveswitch" ] && install -Dm755 "target/release/raveswitch" "$pkgdir/usr/bin/raveswitch" - [ -f "README.md" ] && install -Dm644 "README.md" "$pkgdir/usr/share/doc/raveswitch/README.md" - [ -f "packaging/raveswitch.service" ] && install -Dm644 "packaging/raveswitch.service" "$pkgdir/usr/lib/systemd/user/raveswitch.service" + 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" - if [ -f "assets/raveswitch-settings.png" ]; then - install -Dm644 "assets/raveswitch-settings.png" "$pkgdir/usr/share/pixmaps/raveswitch-settings.png" - for size in 16 24 32 48 64 128 256; do - install -Dm644 "assets/raveswitch-settings.png" "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/raveswitch-settings.png" + # 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 - fi - - [ -f "packaging/hu.rp1.raveswitch.settings.desktop" ] && install -Dm644 "packaging/hu.rp1.raveswitch.settings.desktop" "$pkgdir/usr/share/applications/hu.rp1.raveswitch.settings.desktop" - - mkdir -p "$pkgdir/usr/share/raveswitch" - [ -f "packaging/usr-share.tar" ] && tar -xf "packaging/usr-share.tar" -C "$pkgdir/usr/share/raveswitch" 2>/dev/null || true + done - [ -f "assets/raveicon.png" ] && install -Dm644 "assets/raveicon.png" "$pkgdir/usr/share/raveswitch/assets/raveicon.png" + 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" - if [ -x "$pkgdir/usr/bin/raveswitch" ]; then - "$pkgdir/usr/bin/raveswitch" completions bash -p "$pkgdir/usr/share/bash-completion/completions" 2>/dev/null || true - "$pkgdir/usr/bin/raveswitch" completions fish -p "$pkgdir/usr/share/fish/vendor_completions.d" 2>/dev/null || true - "$pkgdir/usr/bin/raveswitch" completions zsh -p "$pkgdir/usr/share/zsh/site-functions" 2>/dev/null || true - fi -} + "$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" +}
\ No newline at end of file |