%global forgeurl https://github.com/Keriew/augustus %global date %(date +%%Y%%m%%d) %global commit HEAD %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: augustus Version: 4.0.0 # Release format: git%{?dist} Release: %{date}git%{shortcommit}%{?dist} Summary: An open source re-implementation of Caesar III License: AGPLv3+ URL: %{forgeurl} # Source0 pulls the tarball from GitHub based on the commit defined above Source0: %{forgeurl}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: SDL2-devel BuildRequires: SDL2_mixer-devel BuildRequires: zlib-devel BuildRequires: libpng-devel BuildRequires: hicolor-icon-theme BuildRequires: desktop-file-utils Requires: SDL2 Requires: SDL2_mixer Requires: hicolor-icon-theme Requires: caesar3-data %description Augustus is a fully playable open source re-implementation of Caesar III. It aims to provide the same experience as the original game, with improved UI and gameplay enhancements. Note: You need the original Caesar III assets (c3.eng, etc.) to play. %prep %autosetup -n %{name}-%{commit} -p1 %build %cmake . %cmake_build %install %cmake_install # Install desktop file and icons if the build system doesn't do it automatically # (Augustus cmake usually handles this, but verification is good practice) if [ -f %{buildroot}%{_datadir}/applications/%{name}.desktop ]; then desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop fi %files %license LICENSE.txt %doc README.md %{_bindir}/%{name} %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/apps/*.png %{_datadir}/metainfo/*.xml %changelog * %(date "+%a %b %d %Y") User - %{version}-%{release} - Automated build from git HEAD