# VRGB Fedora/COPR packaging draft, derived from upstream v1.0.0 and AUR PKGBUILD. # Intended repository location: packaging/fedora/vrgb.spec # This is a draft; Fedora mock/COPR builds and hardware tests are pending. Name: vrgb Version: 1.0.0 Release: 3%{?dist} Summary: RGB keyboard backlight control for compatible ASUS Vivobooks License: MIT URL: https://github.com/vrgb-dev/vrgb Source0: https://github.com/vrgb-dev/vrgb/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-build BuildRequires: python3-installer BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: systemd-rpm-macros Requires: python3 %description VRGB Core controls compatible ASUS Vivobook RGB keyboards using Linux HID LampArray. It provides a lightweight command-line interface and an importable Python module without a graphical desktop dependency. %package -n vrgb-gui Summary: Desktop GUI, tray, profiles and automation for VRGB Requires: vrgb = %{version}-%{release} Requires: hicolor-icon-theme %description -n vrgb-gui VRGB Suite adds a PyQt6 graphical interface, tray integration, lighting profiles, software rainbow effects, and desktop automation to VRGB Core. %prep %autosetup -n vrgb-%{version} # The source tree's restore unit is for ./install.sh (/usr/local/bin). # RPM installs its CLI under /usr/bin. sed 's|/usr/local/bin/vrgb|/usr/bin/vrgb|' systemd/vrgb-restore.service > vrgb-restore-rpm.service grep -q '^ExecStart=/usr/bin/vrgb restore$' vrgb-restore-rpm.service %build %{__python3} -m build --wheel --no-isolation --outdir dist-core . %{__python3} -m build --wheel --no-isolation --outdir dist-gui suite %install # Both wheel projects are built independently, just like the AUR package. %{__python3} -m installer --destdir=%{buildroot} dist-core/*.whl %{__python3} -m installer --destdir=%{buildroot} dist-gui/*.whl install -Dpm0644 vrgb-restore-rpm.service %{buildroot}%{_userunitdir}/vrgb-restore.service install -Dpm0644 packaging/70-vrgb.rules %{buildroot}%{_udevrulesdir}/70-vrgb.rules install -Dpm0644 packaging/vrgb.sysusers %{buildroot}%{_sysusersdir}/vrgb.conf install -Dpm0644 suite/data/vrgb-gui.desktop %{buildroot}%{_datadir}/applications/vrgb-gui.desktop sed -i 's/^Categories=.*/Categories=Utility;/' %{buildroot}%{_datadir}/applications/vrgb-gui.desktop install -Dpm0644 suite/data/vrgb-gui.service %{buildroot}%{_userunitdir}/vrgb-gui.service for size in 16 24 32 48 64 128 256; do install -Dpm0644 "suite/data/icons/${size}x${size}/vrgb.png" \ "%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/vrgb.png" done %post # Apply the new rule to already-connected HID devices; do not fail the RPM # transaction if udev is unavailable (e.g. inside a container). if [ -x /usr/bin/udevadm ]; then /usr/bin/udevadm control --reload-rules >/dev/null 2>&1 || : /usr/bin/udevadm trigger --subsystem-match=hidraw --action=change >/dev/null 2>&1 || : fi %files %license LICENSE %doc README.md %{_bindir}/vrgb %{python3_sitelib}/vrgb.py %{python3_sitelib}/__pycache__/vrgb*.pyc %{python3_sitelib}/vrgb-%{version}.dist-info/ %{_userunitdir}/vrgb-restore.service %{_udevrulesdir}/70-vrgb.rules %{_sysusersdir}/vrgb.conf %files -n vrgb-gui %license LICENSE %{_bindir}/vrgb-gui %{python3_sitelib}/vrgb_suite/ %{python3_sitelib}/vrgb_gui-%{version}.dist-info/ %{_datadir}/applications/vrgb-gui.desktop %{_userunitdir}/vrgb-gui.service %{_datadir}/icons/hicolor/*/apps/vrgb.png %changelog * Sat Oct 10 2026 VRGB Maintainers - 1.0.0-3 - Apply udev rules to connected HID devices after installing Core - List the GUI under Utilities only in desktop menus * Sat Oct 10 2026 VRGB Maintainers - 1.0.0-2 - Rely on autogenerated PyQt6 Python distribution dependency for GUI * Sat Oct 10 2026 VRGB Maintainers - 1.0.0-1 - Initial Fedora COPR packaging draft for VRGB Core and Suite