%global commit0 b4d75f143ac3372de48c365e67513581c078abb6 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global bumpver 3 Name: legendary Version: 0.21.0 Release: %{bumpver}.git^%{shortcommit0} Summary: Free and open-source replacement for the Epic Games Launcher License: GPL-3.0-or-later URL: https://github.com/legendary-gl/legendary Source: %{url}/archive/%{commit0}.tar.gz Patch: pyproject.patch BuildArch: noarch BuildRequires: python3-devel %description Legendary is an open-source game launcher that can download and install games from the Epic Games platform on Linux, macOS, and Windows. Its name as a tongue-in-cheek play on tiers of item rarity in many MMORPGs. %prep %autosetup -n %{name}-%{commit0} %generate_buildrequires %pyproject_buildrequires # E: non-executable-script for lib in %{name}/{*.py,downloader/*.py,lfs/*.py,models/*.py}; do sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done # E: non-executable-script %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{name} %files -f %{pyproject_files} %{_bindir}/%{name} %changelog %autochangelog