%global gitdate 20260811 %global gitrev 419123559 %global gitrel %{gitdate}git%{gitrev} Name: solarus Version: 2.2.0 Release: 5%{?gitrel:.%{gitrel}}%{?dist} Summary: An open-source Zelda-like 2D game engine. License: GPLv3 URL: http://www.solarus-games.org/engine/download/ Source0: %{name}-%{version}%{?gitrel:-%{gitrel}}.tar.xz Group: Amusements/Games BuildRequires: pkgconfig(sdl2) >= 2.0.6, pkgconfig(SDL2_image), BuildRequires: pkgconfig(SDL2_ttf), luajit-devel BuildRequires: pkgconfig(openal), pkgconfig(vorbisfile), pkgconfig(ogg) BuildRequires: pkgconfig(Qt6), cmake(glm), cmake(Qt6LinguistTools) BuildRequires: pkgconfig(Qt6Svg), qt6-qtsvg-devel, cmake(qlementine) BuildRequires: pkgconfig(libmodplug), pkgconfig(lua), pkgconfig(physfs), cmake, qt6-qlementine-devel BuildRequires: desktop-file-utils Requires: SDL2, SDL2_image, SDL2_ttf, openal-soft, libvorbis, libogg, qt6-qlementine Requires: libmodplug, lua, physfs, qt6-qtbase Requires(post,postun): /sbin/ldconfig Requires(postun,posttrans): /usr/bin/gtk-update-icon-cache %description Solarus is an open-source Zelda-like 2D game engine. %package devel Summary: Development files for Solarus. Group: Development/Libraries Requires: solarus = %{version}-%{release} %description devel Development files for Solarus, an opensource Zelda-like 2D game engine. %package editor Summary: Quest editor for Solarus. Group: Development/Tools Requires: solarus = %{version}-%{release} Requires(postun,posttrans): /usr/bin/gtk-update-icon-cache Obsoletes: solarus-quest-editor <= 2.0.0 Provides: solarus-quest-editor = %{version}-%{release} %description editor Solarus Editor is a graphical user interface to create, modify and run quests for the Solarus engine. %prep %autosetup %{?gitrel:-n %{name}} %build %cmake \ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \ . %cmake_build pushd editor ## _vpath_builddir should default to redhat-linux-build on Fedora systems ## and it supposedly can be found inside the source directory. ## We need cmake to find the Solarus headers and library while they still aren't installed. ## Also, always use the installed libraries instead of calling git and recompiling them. %cmake \ -DSOLARUS_INCLUDE_DIR:STRING="%{_builddir}/%{buildsubdir}/%{_vpath_builddir}/include/;%{_builddir}/%{buildsubdir}/include" \ -DSOLARUS_LIBRARY:FILEPATH="%{_builddir}/%{buildsubdir}/%{_vpath_builddir}/libsolarus.so" \ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \ . %cmake_build popd %install rm -rf %{buildroot} %cmake_install pushd editor %cmake_install popd rm -rf $RPM_BUILD_ROOT%{_prefix}/share/doc/ # create and install the x-solarus-quest mime type install -m755 -d %{buildroot}%{_datadir}/mime/packages cat > %{name}.xml << EOF Solarus Quest Package EOF install -m644 %{name}.xml %{buildroot}%{_datadir}/mime/packages/ ## install the directories for s in 16 24 32 48 64 128 256 512 1024; do install -m755 -d %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/ install -m644 images/%{name}_icon_${s}.png \ %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png done cat > %{name}.desktop << EOF [Desktop Entry] Version=1.0 Name=Solarus Runner Comment=Play Solarus quests Icon=%{name} Type=Application Exec=%{_bindir}/%{name}-run %f Terminal=false X-Desktop-File-Install-Version=0.23 Categories=Application;Game;AdventureGame; MimeType=application/x-solarus-quest; EOF install -d -m755 %{buildroot}%{_datadir}/applications/ install -m644 %{name}.desktop %{buildroot}%{_datadir}/applications/ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %post /sbin/ldconfig /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun /sbin/ldconfig if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %license license license-details.md %doc changelog.md README.md %{_bindir}/%{name}-run %{_libdir}/*.so.* %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_datadir}/mime/packages/*.xml %{_mandir}/man*/*.gz %{_datadir}/%{name} %files devel %doc AGENTS.md changelog.md compilation.md CONTRIBUTING.md release-workflow.md repository.md %{_includedir}/%{name} %{_libdir}/*.so %files editor %{_bindir}/%{name}-editor %{_datadir}/applications/*editor.desktop %{_datadir}/icons/hicolor/*/apps/*editor.png %{_datadir}/icons/hicolor/*/apps/*editor*.svg %{_datadir}/pixmaps/*.png %{_datadir}/%{name}-editor %changelog * Wed Aug 12 2026 Andrea Santilli - 2.2.0-5.20260811git419123559 - Update to version 2.2.0, gitlab revision 419123559. - Re-enable the disabled installation routine for icon files. - Re-enable the post, postun, posttrans macros. - Update the doc files. - Update the file list. - Solarus has undergone a set of relevant changes lately: no more general launcher and the editor is now included in the main sources. - The new Editor is in a subdirectory and it is not compiled by default: we enable it here. - Use the %cmake* macros for building only. - Adjust cmake settings so that the Solarus headers and libraries can be found at build-time while compiling the Editor. - Add a subpackage for the Editor. - Add a mime type for *.solarus files. - Fix the desktop entry to make it use the new mime type. * Mon Jul 17 2023 Andrea Santilli - 1.7.0-4.20230713git207eec981 - Update to gitlab revision 207eec981. - Remove sdl fix. - Change dependency names on qt5 and add one to qt linguist. - Add dependencies on glm. - Remove bits that used to require gtk-update-icon-cache after installing the desktop entries. - Remove the custom desktop entry and icon installation routine. - Remove a workaround that prevented libraries from being installed in lib64 instead of lib on 64-bit systems. - Distinguish *.so.* from *.so libraries and move the latter to the devel package. - Let autosetup handle things. - Change root directory name. - Add manual files. - Update the included text document list. - Add translations, metainfo, svg and pixmaps files. * Sun Nov 27 2016 Andrea Santilli - 1.4.5-3 - Update to v1.5.0 and added dependency on qt5. - Fix for cmake version and remove libsdl2main checking. - Add desktop entry for the new GUI. - Add post/postun/posttrans operations. * Sat Jul 23 2016 Andrea Santilli - 1.4.5-2 - Update to version 1.4.5. - Update links. - Move dependencies to SDL2. - Add dependency on luajit. - Drop doxygen documentation as it was deleted. - Remove doc files from installation to add them back to the file list. - Update file list. - Add devel package. - Workaround for the wrong library path. * Sun Jul 07 2013 Andrea Santilli - 1.0.4-1 - Initial RPM release.