fife/fife.spec

154 lines
4.4 KiB
RPMSpec

#
# spec file for package fife
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) Nelson Marques <nmarques@opensuse.org>
#
# 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/
#
%define _soname 0
Name: fife
%define _name libfife%{_soname}
Version: 0.3.3r3
Release: 1
License: LGPL-2.0+
Summary: A powerful 2D game engine
Url: http://www.fifengine.de
Group: Amusements/Games/Other
Source: http://netcologne.dl.sourceforge.net/project/fife/active/src/%{name}-%{version}.tar.gz
# Update license
Source99: http://www.gnu.org/licenses/lgpl-2.0.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: boost-devel
BuildRequires: chrpath
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: libpng-devel
BuildRequires: libstdc++-devel
BuildRequires: python-devel
BuildRequires: scons
BuildRequires: swig
BuildRequires: tinyxml-devel
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(vorbis)
BuildRequires: pkgconfig(zlib)
%if 0%{?suse_version}
BuildRequires: libSDL_image-devel
BuildRequires: libSDL_ttf-devel
BuildRequires: pkgconfig(guichan-0.8)
BuildRequires: pkgconfig(openal)
%else 0%{?fedora_version}
BuildRequires: SDL_image-devel
BuildRequires: SDL_ttf-devel
BuildRequires: guichan-devel
BuildRequires: libXcursor-devel
BuildRequires: openal-soft-devel
%endif
%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.
%package -n %{_name}
Summary: System shared libraries for fife engine games
Group: Amusements/Games/Other
%description -n %{_name}
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 contains the shared libraries.
%package -n python-%{name}
Summary: Python extensions for the fife engine
Group: Amusements/Games/Other
Requires: python
%description -n python-%{name}
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 contains the Python extensions.
%package devel
Summary: Development files for %{name} engine
Group: Development/Libraries/Other
Requires: %{_name} = %{version}
Requires: python-fife = %{version}
%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 contains development files.
%prep
%setup -q
# Update licence
rm COPYING
cp %{S:99} COPYING
%build
# empty
%install
scons \
DESTDIR=%{buildroot} \
--enable-rend-camzone \
--enable-rend-grid \
--prefix=%{_prefix} \
--python-prefix=%{python_sitelib} \
--lib-dir=%{_lib} \
install-all
pushd %{buildroot}%{_libdir}
ln -s libfife.so.%{version} libfife.so.0
ln -s libfife.so.%{version} libfife.so
popd
# showstopper: removing RPATH
find %{buildroot} -name '*.so.*' -print -type f -print -exec chrpath --delete {} \;
find %{buildroot}%{python_sitelib} -name '*.so' -type f -print -exec chrpath --delete {} \;
# delete static libraries
find %{buildroot}%{_libdir} -name '*.a' -type f -delete -print
# permissions: we need to fix some permissions
find %{buildroot}%{_includedir} -perm 0755 -type f -print -exec chmod 0644 {} \;
%post -n %{_name} -p /sbin/ldconfig
%postun -n %{_name} -p /sbin/ldconfig
%files -n %{_name}
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/*.so.*
%files -n python-%{name}
%defattr(-,root,root)
%{python_sitelib}/
%files devel
%defattr(-,root,root)
%doc CHANGES
%{_includedir}/fife/
%{_libdir}/*.so
%changelog