%global app_id com.oad.grab Name: grab Version: 0.1.0 Release: 1%{?dist} Summary: NVIDIA GPU driver management tool for Fedora and RHEL License: MIT URL: https://codeberg.org/oadardery/grab-fedora-gpu-manager VCS: git+https://codeberg.org/oadardery/grab-fedora-gpu-manager.git#d9f8e2aa866b2fbe85dc06e139cd28a1e7ade96e: Source0: grab-fedora-gpu-manager-d9f8e2aa.tar.gz ExclusiveArch: x86_64 # ── Build dependencies ────────────────────────────────────────────────────── # Tauri 2 / Rust BuildRequires: rust >= 1.70 BuildRequires: cargo BuildRequires: pkgconfig # Frontend BuildRequires: nodejs >= 18 BuildRequires: curl BuildRequires: unzip # Tauri 2 native deps (webkit2gtk 4.1 + libsoup3) BuildRequires: webkit2gtk4.1-devel BuildRequires: libsoup3-devel BuildRequires: gtk3-devel BuildRequires: gdk-pixbuf2-devel BuildRequires: pango-devel BuildRequires: cairo-devel BuildRequires: glib2-devel BuildRequires: libappindicator-gtk3-devel BuildRequires: librsvg2-devel BuildRequires: openssl-devel # ── Runtime dependencies ──────────────────────────────────────────────────── Requires: webkit2gtk4.1 Requires: libsoup3 Requires: gtk3 Requires: pciutils Requires: polkit # Weak deps — the things this app helps you install Recommends: dnf Suggests: akmod-nvidia %description Grab is a desktop application that guides users through installing and managing NVIDIA GPU drivers on Fedora and RHEL-family distributions. It checks system prerequisites (RPM Fusion repos, kernel headers, Secure Boot status), installs missing components via pkexec, and monitors driver versions for updates. %prep %autosetup -n grab-fedora-gpu-manager %build # Install bun locally for the build process curl -fsSL https://bun.sh/install | bash export PATH="$HOME/.bun/bin:$PATH" # Install frontend dependencies using bun bun install --ignore-scripts # Note: We do not need to explicitly run `bun run build` here # because cargo/tauri will automatically trigger it based on # the `beforeBuildCommand` in tauri.conf.json. # Build the Tauri/Rust binary in release mode cd src-tauri cargo build --release cd .. %install # Binary install -Dm755 src-tauri/target/release/%{name} \ %{buildroot}%{_bindir}/%{name} # Desktop entry install -d %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{app_id}.desktop << 'EOF' [Desktop Entry] Name=Grab Comment=NVIDIA GPU driver manager for Fedora & RHEL Exec=grab Icon=grab Terminal=false Type=Application Categories=System;Settings;HardwareSettings; Keywords=nvidia;gpu;driver;graphics; StartupWMClass=grab EOF # Icons install -Dm644 src-tauri/icons/32x32.png \ %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png install -Dm644 src-tauri/icons/128x128.png \ %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png install -Dm644 src-tauri/icons/128x128@2x.png \ %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png install -Dm644 src-tauri/icons/icon.png \ %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/%{name}.png # Polkit policy — allows pkexec dnf without a custom agent install -d %{buildroot}%{_datadir}/polkit-1/actions cat > %{buildroot}%{_datadir}/polkit-1/actions/%{app_id}.policy << 'POLICYEOF' Grab https://codeberg.org/oadardery/grab-fedora-gpu-manager Install or update NVIDIA driver packages Authentication is required to manage NVIDIA driver packages grab auth_admin auth_admin auth_admin_keep /usr/bin/dnf true POLICYEOF %files %license LICENSE* %doc README.md %{_bindir}/%{name} %{_datadir}/applications/%{app_id}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_datadir}/polkit-1/actions/%{app_id}.policy %post # Update icon cache if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || : fi # Update desktop database if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database %{_datadir}/applications &>/dev/null || : fi %postun if [ $1 -eq 0 ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || : fi if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database %{_datadir}/applications &>/dev/null || : fi fi %changelog * Thu May 29 2025 oad - 0.1.0-1 - Initial package - NVIDIA GPU detection and driver management - RPM Fusion repo setup (Fedora + RHEL/Rocky/Alma/CentOS) - EPEL support for RHEL-family distros - Kernel version validation and devel header installation - Secure Boot detection and signing tool installation - Driver update checking with dynamic UI