%define soname %{version} %define libname %mklibname %{name} %{soname} %define develname %mklibname %{name} -d %define oname fifengine Name: fife Version: 0.4.2 Release: %mkrel 24 Summary: Cross-platform game creation framework Group: Development/Tools License: LGPLv2+ URL: https://www.fifengine.net/ Source0: https://github.com/fifengine/fifengine/archive/%{version}/%{oname}-%{version}.tar.gz # Upstream Patch1: 0001-removed-flags-that-are-not-supported-with-swig-4.0.patch Patch2: 0001-remove-deprecated-getchildren.patch # Debian Patch51: 0004-Try-to-fix-993132-cherry-picking-upstream-patches.patch # Others Patch101: fifengine-missing-includes.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: fifechan-devel >= 0.1.5 BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(SDL2_ttf) BuildRequires: pkgconfig(SDL2_image) BuildRequires: pkgconfig(tinyxml) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(zlib) BuildRequires: swig Provides: %{name}-python = %{version}-%{release} Provides: python3-%{name} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} %description FIFE is a free, open-source cross-platform game engine, written in C++, making it highly portable (it supports Linux, Windows and Mac). This package comes with the game engine only. The game Unknown Horizons is one of the clients using this engine. %package -n %{libname} Summary: Shared libs for FIFE Group: System/Libraries Requires: %{name} = %{version}-%{release} %description -n %{libname} Shared libs for FIFE. %package -n %{develname} Summary: Development package for FIFE Group: Development/C++ Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %{name}-devel < %{version}-%{release} %description -n %develname Files for development with FIFE. %prep %autosetup -n %{oname}-%{version} -p1 # Fix libdir sed -i CMakeLists.txt -e 's@\${CMAKE_INSTALL_PREFIX}/lib@\${CMAKE_INSTALL_PREFIX}/%{_lib}@' %build %ifarch armv7hl # Try to avoid memory exhaustion export CFLAGS="%optflags -g1" export CXXFLAGS="%optflags -g1" %endif %cmake \ -DPYTHON_SITE_PACKAGES=%{python3_sitearch} \ -DPYTHON_EXECUTABLE="%__python3" \ -Dbuild-library=ON \ -Dbuild-python=ON \ -Drend-camzone=ON \ -Drend-grid=ON \ -Duse-githash=OFF \ %ifarch armv7hl -DCMAKE_BUILD_TYPE=Release \ %endif %cmake_build -j1 %install %cmake_install %files %doc AUTHORS CHANGELOG.md README.md %license LICENSE.md %{python3_sitearch}/%{name} %files -n %{libname} %{_libdir}/lib%{name}.so.%{version} %files -n %{develname} %{_libdir}/lib%{name}.so %{_includedir}/%{name}/