%global commit 9c2868c0dcd18e28b3c2ecc64195218e61b90986 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20210714 %bcond_without snapshot %if %{with snapshot} %global dist .%{date}git%{shortcommit}%{?dist} %endif %global binname psxcardmgr %global vc_url https://github.com/raphnet/%{name} Name: psxmemcardmgr Version: 0.9.1 Release: 1%{?dist} Summary: PSX Memory Card Manager License: GPL-2.0-only URL: https://www.raphnet.net/programmation/psxmemcardmgr/index_en.php %if %{with snapshot} Source0: %{vc_url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz %else Source0: %{vc_url}/archive/%{version}/%{name}-%{version}.tar.gz %endif BuildRequires: make BuildRequires: desktop-file-utils BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Widgets) Requires: gnome-icon-theme %description PSX Memory Card Manager is a very simple Playstation memory card image manipulation tool with a GUI. Combined with the right hardware, transfering data to and from a real memory card is also possible. %prep %autosetup %{?with_snapshot:-n %{name}-%{commit}} -p1 cat > %{binname}.desktop < - 0.9.1-1.20210714git9c2868c - Initial spec