# # spec file for fife (Version 0.3.2) # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild %global soname 0 # Release sources: http://sourceforge.net/projects/fife/files/active/src/%{name}-%{version}.tar.gz/download # The sources were recompressed as: %{name}-%{version}.tar.bz2 for this package. # Not building the documentation for this package, anyone wants docs? Name: fife # Quick workaround for a fast library package %define _name libfife Version: 0.3.2 Release: 1 License: LGPLv2+ Summary: A powerful 2D game engine Url: http://www.fifengine.de Group: Amusements/Games/Other Source: %{name}-%{version}r2.tar.gz # Currently: "macro-in-comment" Source99: %{name}-rpmlintrc # PATCH-FIX-OPENSUSE - fife-opensuse-packaging-fixes.patch nmarques@opensuse.org -- Remove 'ext' so we use system shared libraries Patch0: %{name}-opensuse-packaging-fixes.patch # PATCH-FIX-UPSTREAM - fife-changeset_r3592.patch nmarques@opensuse.org -- Cherry picked from git, fixes some issues with boost on vfsdirectory.cpp Patch1: %{name}-changeset_r3592.patch # PATCH-FIX-UPSTREAM - fife-soname-fix.patch -- Modified for openSUSE from existing Fedora patch Patch2: %{name}-soname-fix.patch BuildRequires: boost-devel BuildRequires: lib64freeglut-devel BuildRequires: gcc-c++ BuildRequires: guichan-devel BuildRequires: libpng-devel BuildRequires: libstdc++-devel BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(sdl) BuildRequires: pkgconfig(vorbis) BuildRequires: python-devel # Required for a quick rpath workaround BuildRequires: chrpath BuildRequires: scons BuildRequires: swig BuildRequires: zlib-devel %description FIFE stands for Flexible Isometric Free Engine and is a cross platform game creation framework. It provides you with the ability to create a game using Python interfaces. You can make just about any 2D game with FIFE but it is more geared toward a RTS or RPG in just about any view style (isometric ortop-down). For more information on FIFE's capabilities visit the Features page. --- http://www.fifengine.de http://wiki.fifengine.net/Features %package -n %{_name}%{soname} Summary: System shared libraries for fife engine games Group: Amusements/Games/Other %description -n %{_name}%{soname} FIFE stands for Flexible Isometric Free Engine and is a cross platform game creation framework. It provides you with the ability to create a game using Python interfaces. This package provides the shared libraries. --- http://www.fifengine.de http://wiki.fifengine.net/Features %package -n %{name}-python Summary: Python extensions for the fife engine Group: Amusements/Games/Other Requires: python %description -n %{name}-python FIFE stands for Flexible Isometric Free Engine and is a cross platform game creation framework. It provides you with the ability to create a game using Python interfaces. This package provides the python extensions. --- http://www.fifengine.de http://wiki.fifengine.net/Features %package devel Summary: Development files for %{name} engine Group: Development/Libraries/Other Requires: %{_name}%{soname} = %{version} Requires: %{name}-python = %{version} %if 0%{?suse_version} Requires: pkg-config %endif %if 0%{?fedora_version} Requires: pkgconfig %endif %description devel FIFE stands for Flexible Isometric Free Engine and is a cross platform game creation framework. It provides you with the ability to create a game using Python interfaces. This package provides the development files. --- http://www.fifengine.de http://wiki.fifengine.net/Features %prep #%setup -q %setup -n %{name}-%{version}r2 %patch0 -p1 %patch1 -p1 # Add soname to generated library %patch2 -p1 sed -i "s|SONAME|%{soname}|g" \ engine/SConscript # Use libdir instead of lib (for 64bit systems) for l in ./engine/SConscript ./build/linux2-config.py do sed -i "s|'lib'|'%{_lib}'|g" $l done # UTF-8 friendly fix - upstream pinged! for f in AUTHORS CHANGES COPYING README do iconv -f iso-8859-1 -t utf-8 $f |sed 's|\r||g' > $f.utf8 touch -c -r $f $f.utf8 mv $f.utf8 $f done %build # Parallel builds will break the package - upstream pinged scons \ CXXFLAGS='%{optflags}' \ --prefix=%{_prefix} \ --python-prefix=%{python_sitelib} \ --enable-rend-camzone \ --enable-rend-grid \ %{name}-shared \ %{name}-python \ %{name}-swig %install # Parallel builds will break the package - upstream pinged scons \ CXXFLAGS='%{optflags}' \ DESTDIR=%{buildroot} \ install-shared \ install-python \ install-dev \ --prefix=%{_prefix} \ --python-prefix=%{python_sitelib} # rpath workaround find %{buildroot} -name '*.so' -print -type f -exec chrpath --delete {} \; # playing a little bit with soname mv %{buildroot}/%{_libdir}/%{_name}.so %{buildroot}/%{_libdir}/%{_name}.so.%{version} pushd %{buildroot}%{_libdir} ln -s %{_name}.so.%{version} %{_name}.so.%{soname} ln -s %{_name}.so.%{version} %{_name}.so popd # We use system shared libraries, not static find %{buildroot}%{_libdir} -name '*.a' -type f -delete -print %clean %{?buildroot:%__rm -rf "%{buildroot}"} %post -n %{_name}%{soname} -p /sbin/ldconfig %postun -n %{_name}%{soname} -p /sbin/ldconfig %files -n %{_name}%{soname} %defattr(-,root,root) %doc AUTHORS COPYING README %{_libdir}/*.so.* %files -n %{name}-python %defattr(-,root,root) %{python_sitelib}/fife/ %files devel %defattr(-,root,root) %doc CHANGES %{_includedir}/fife/ %{_libdir}/*.so %changelog