%define version %(echo -n "$(curl -s -X GET https://api.github.com/repos/uwzis/GPU-Passthrough-Manager/commits -H 'Accept: application/json' | grep -m 1 "sha" | awk -F'"' '{print substr($4, 1, 7)}')") %global debug_package %{nil} Name: gpu-passthrough-manager Release: %autorelease Version: git_%{version} Summary: 'GPU passthrough made easy.' License: GPL URL: https://github.com/uwzis/GPU-Passthrough-Manager/ Source0: %{url}/archive/refs/heads/main.tar.gz BuildRequires: gcc-c++ gtk3-devel make jsoncpp-devel Requires: python3 %prep %setup -q -n GPU-Passthrough-Manager-main %description 'GPU Passthrough Manager is a GUI application utilizing vfio drivers to quickly load your default and VFIO drivers with just a few clicks. passthrough a graphics devices to virtual machines is made easy now.' %build make mv 'icons/GPU Passthrough Manager.desktop' ./%{name}.desktop %install install -Dm755 %{name} %{buildroot}/%{_bindir}/%{name} install -Dm755 GPUPM %{buildroot}/%{_datadir}/%{name}/GPUPM install -Dm644 style.css %{buildroot}/%{_datadir}/%{name}/style.css install -Dm644 %{name}.desktop %{buildroot}/%{_datadir}/applications/%{name}.desktop install -Dm644 README.md %{buildroot}/%{_datadir}/doc/%{name}/README.md install -Dm644 LICENSE %{buildroot}/%{_licensedir}/%{name}/LICENSE install -dm755 %{buildroot}/%{_datadir}/%{name}/py install -Dm644 py/* %{buildroot}/%{_datadir}/%{name}/py/ install -dm755 %{buildroot}/%{_datadir}/%{name}/icons install -Dm644 icons/* %{buildroot}/%{_datadir}/%{name}/icons/ install -Dm644 tools/org.freedesktop.%{name}.policy %{buildroot}/%{_datadir}/polkit-1/actions/org.freedesktop.%{name}.policy install -Dm755 tools/Reboot %{buildroot}/%{_datadir}/%{name}/tools/Reboot install -Dm644 tools/defaultmgr.sh %{buildroot}/%{_datadir}/%{name}/tools/defaultmgr install -Dm644 tools/dracut-utils %{buildroot}/%{_datadir}/%{name}/tools/dracut-utils install -Dm644 tools/fts.sh %{buildroot}/%{_datadir}/%{name}/tools/fts.sh install -Dm644 tools/vfiomgr.sh %{buildroot}/%{_datadir}/%{name}/tools/vfiomgr.sh %files %{_bindir}/%{name} %{_datadir}/%{name}/* %{_licensedir}/%{name}/LICENSE %{_datadir}/doc/%{name}/README.md %{_datadir}/polkit-1/actions/org.freedesktop.%{name}.policy %{_datadir}/applications/%{name}.desktop %changelog %autochangelog