%global gitdate 20230713 %global gitrev 207eec981 %global gitrel %{gitdate}git%{gitrev} Name: solarus Version: 1.7.0 Release: 4%{?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 ##Patch0: sdlfix.diff 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(Qt5), cmake(glm), cmake(Qt5LinguistTools) BuildRequires: pkgconfig(libmodplug), pkgconfig(lua), pkgconfig(physfs), cmake Requires: SDL2, SDL2_image, SDL2_ttf, openal-soft, libvorbis, libogg Requires: libmodplug, lua, physfs, qt5-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. %prep %autosetup %{?gitrel:-n %{name}} %build cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} . make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT %make_install rm -rf $RPM_BUILD_ROOT%{_prefix}/share/doc/ ### the configuration we use here erroneously ignores CMAKE_INSTALL_LIBDIR ##if [ "x%{_libdir}" != "x%{_prefix}/lib" ]; then ## mv "$RPM_BUILD_ROOT%{_prefix}/lib" "$RPM_BUILD_ROOT%{_libdir}" ##fi ##for s in 16 24 32 48 64 128 256 512 1024; do ## install -m755 -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/ ## install -m644 cmake/icons/%{name}_icon_$s.png \ ## $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png ##done ## ##cat > %{name}.desktop << EOF ##[Desktop Entry] ##Name=Solarus ##Comment=Launcher for Solarus Quests ##Icon=%{name}.png ##Type=Application ##Exec=%{name} ##Terminal=false ##X-Desktop-File-Install-Version=0.23 ##Categories=Application;Game;Emulator; ##EOF ## ##install -d -m755 $RPM_BUILD_ROOT%{_datadir}/applications/ ##install -m644 %{name}.desktop $RPM_BUILD_ROOT%{_datadir}/applications/ %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.txt license_gpl.txt %doc changelog.md readme.md %{_bindir}/%{name}* %{_libdir}/*.so.* %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/apps/*.png %{_datadir}/icons/hicolor/*/apps/*.svg %{_datadir}/pixmaps/*.png %{_mandir}/man*/*.gz %{_datadir}/*/translations/*.qm %{_datadir}/metainfo/*.xml %files devel %{_includedir}/%{name} %{_libdir}/*.so %changelog * 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.