%global gituser actuallyaridan %global gitname linux-devmgmt %global name devmgmt %global gitdate 20260801 %global commit abcdefg # not used currently %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Build source is tarball release = 1 or git commit = 0 %global build_release 1 # Force use of Qt5 = 1 (testing only) %global force_qt5 0 %global vers 2.1.1 %global rel 0.1 %global distsuffix .1sunshine # determine Qt version to use # dist Qt5? Qt6? # Epel 7 yes no # Epel 8 yes no # Epel 9 yes yes # Rhel 8 yes no # Rhel 9 yes no # Centos-stream 8 yes no # Centos-stream 9 yes no # Centos-stream 10 no yes # Fedora 42+ yes yes # # i.e. # - Centos behaves like Rhel # - Epel is different %if 0%{?force_qt5} || (0%{?rhel} && 0%{?rhel} < 10) || (0%{?centos} && 0%{?centos} < 10) || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?fedora} && 0%{?fedora} < 40) %global qt_ver 5 %error "Qt5 is not supported" %else %global qt_ver 6 %endif Name: %{name} Version: %{vers} Summary: A faithful recreation of the Windows Device Manager. License: GPL-3.0-only URL: https://github.com/actuallyaridan/linux-devmgmt VCS: https://github.com/actuallyaridan/linux-devmgmt.git %if 0%{?build_release} > 0 # build from the tarball release Release: %{rel}%{?dist}%{?distsuffix} Source0: %{url}/archive/refs/tags/v%{vers}.tar.gz#/%{gitname}-%{vers}.tar.gz %else # build from the git commit snapshot Release: %{rel}.%{gitdate}git%{shortcommit}%{?dist}%{?distsuffix} Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{gitname}-%{shortcommit}.tar.gz %endif Patch0: 0001-suppress-Wayland-warning.patch BuildRequires: cmake%{?rhel:3} >= 3.16 BuildRequires: desktop-file-utils BuildRequires: qt%{qt_ver}-qtbase-devel Requires: /usr/sbin/modinfo Requires: pkexec # /usr/bin/bluetoothctl Requires: bluez Suggests: dkms # not useful for RPM based distributions # Suggests: pacman %description A faithful recreation of the Windows Device Manager built with Qt6 and real hardware backends via sysfs/procfs. %prep %if 0%{?build_release} > 0 %autosetup -p1 -n %{gitname}-%{vers} %else %autosetup -p1 -n %{gitname}-%{commit} %endif %build %if 0%{?rhel} > 0 %{cmake3} %{cmake3_build} %else %{cmake} %{cmake_build} %endif %install %if 0%{?rhel} > 0 %{cmake3_install} %else %{cmake_install} %endif desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{gitname}.desktop %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_datadir}/applications/* %changelog * Wed Aug 05 2026 Moritz Barsnick 2.1.1-0.1.1sunshine - initial RPM